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
how to custom http response error. when cannot unmarshal http request data to model
Ex.
From...
{
"error": "json: cannot unmarshal number into Go value of type string",
"code": 3,
"message": "json: cannot unmarshal number into Go value of type string"
}
To...
{
"error": {
"field1": 11013,
"field2": 1401,
"field3": 0,
"field4": "unmarshal type error"
}
}
The text was updated successfully, but these errors were encountered:
FunnyDevP
changed the title
custom marshal response error
custom unmarshal response error
Apr 16, 2020
how to custom http response error. when cannot unmarshal http request data to model
Ex.
The text was updated successfully, but these errors were encountered: