I'm having a resolver function and want to debug/l...
# prisma-whats-new
q
I'm having a resolver function and want to debug/log some things. In the resolver function:
Copy code
export default async event => {
    ...
      throw new Error('some message')
    ...
  } catch (err) {
    console.log(err)
    return { error: 'An unexpected error occured' }
  }
}
However, when I check the logs, I never get the log message in my logs. I always get the same message: `{"error":"The resolver function
authorize
is not nullable, but the function returned null."}` which is not what I expect to see. What am I missing?
n
can you share a full code snippet that reproduces this behaviour?
q
oh, sure, the most simple version would be:
Copy code
export default async event => {
    throw new Error('some message')
  } catch (err) {
    console.log(err)
    return { error: 'An unexpected error occured' }
  }
}
Let me check for sure 🙂
yeah, it's always the same...