Skip to content

handleServerErrorLog should have access to metadata / inputs #177

Closed Answered by TheEdoRan
Gawdfrey asked this question in Q&A
Discussion options

You must be logged in to vote

Starting from v7.1.3, both handleReturnedServerError and handleServerErrorLog functions get util props as their second argument. More information about that here. handleServerErrorLog also has access to returnedError now, in addition to the originalError, so it's much more flexible.

I am also wondering if the handleServerErrorLog has any right to life, if the error itself was exposed to the middleware? Probably solved the way it is for a reason...

handleServerErrorLog is there since the beginning, when the library only supported one monolithic middleware defined at the instance level. Now you can handle logging both inside middleware functions and in handleServerErrorLog. I think it's f…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@Gawdfrey
Comment options

Answer selected by TheEdoRan
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants