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
invalid type: string "bar", expected u32 at line 1 column 14
I would like to customize the error message because it doesn't quite match what I would expect a web server to return:
The line and column number is often not relevant, the payloads are often sent on one line and the column number would be very high. I would rather have the path returned by serde_path_to_error instead.
The u32 type is really rust specific, saying integer or positive integer would be better.
I looked at building the message myself with the help of serde_path_to_error, unfortunately the Error type of this crate has most interesting things as private. There is for example no way to access the ErrorCode.
Would you consider making it possible to customize the error messages one way or another?
The text was updated successfully, but these errors were encountered:
The following code:
prints:
I would like to customize the error message because it doesn't quite match what I would expect a web server to return:
So here is the ideal error message for me:
I looked at building the message myself with the help of
serde_path_to_error
, unfortunately the Error type of this crate has most interesting things as private. There is for example no way to access theErrorCode
.Would you consider making it possible to customize the error messages one way or another?
The text was updated successfully, but these errors were encountered: