You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It should probably respond with more descriptive error messages. In my case I was missing a language header, and it would have been useful to have been told that!
You might consider using something like joi to handle param validation and error message generation!
The text was updated successfully, but these errors were encountered:
Depending on the usage, you may be interested on doing different things if something fails or succeeds.
I agree that we should send just a null if we have no errors at all
I think that in case we have some errors, we should have null instead of undefined for the response[x][0]. Do you agree?
The API responds with some details, the client just generically says it has some problems. So, I think here is just about leveraging the client in order to pass the error here - I agree.
In regards of the param validation, that happens in the API when receiving request - in fact each component has a specific way to handle parameters parsing and respond with proper error. So, here, as 2), I think it is just a matter of making the client to forward the error details to the error callback.
The
renderComponents
function should respond with more intuitive errors.renderComponents
responds with an array of[undefined, undefined ... ]
on success. Instead, on success, the passed error should simply benull
.On failure it responds with,
["Server-side rendering failed", "Server-side rendering failed"... ]
It should probably respond with more descriptive error messages. In my case I was missing a language header, and it would have been useful to have been told that!
You might consider using something like joi to handle param validation and error message generation!
The text was updated successfully, but these errors were encountered: