Closed GabrielBianconi closed 1 month ago
Sure, however I wouldn't put a made up type unknown_error_type
and instead keep it empty ''
when absent, or not even include it in format string if absent.
In addition, it makes sense to do the same for all fields of struct ApiError
for consistency. PR is welcome!
Great.
@64bit Could you clarify what you have in mind for "In addition, it makes sense to do the same for all fields of struct ApiError
for consistency."? Do you mean adding param
and code
, if available? (They're not currently included, and message
isn't optional.)
I can send a PR later.
Ah yes, your interpretation is correct. Previously the message was sort of "key": "value".
Might as well do the same for all the fields in the struct ApiError
once and for all..
Sounds good. I'll send a PR in a few days.
In
error.rs
, we have:The
{:?}
leads to error messages that aren't client-friendly, such as:Could we replace it with something more client-friendly like:
Thanks!