This repository was archived by the owner on Mar 20, 2023. It is now read-only.
This repository was archived by the owner on Mar 20, 2023. It is now read-only.
formatError
error ignores custom error properties #421
Closed
Description
I am throwing a custom error inside the resolver with additional parameters, unfortunately all custom fields are being stripped out from the formatError: error => {}
callback.
// error
class CustomError {
constructor () {
this.foo = 'bar'
}
}
// resolver
try {
throw new CustomError()
}
// graphQL
...
formatError: err => {
console.log(err.foo) // undefined
}
Metadata
Metadata
Assignees
Labels
No labels