openapi-ts-client-gen icon indicating copy to clipboard operation
openapi-ts-client-gen copied to clipboard

Store response, http status and body into the custom error

Open iskandersierra opened this issue 4 years ago • 1 comments

I was looking at this line where you are using a kind of convention where you expect an error body to have status, message and type fields. This is very specific in my opinion. Instead, could we have the entire response, body and http status into the custom error? Right now I cannot tell if an error was a 400 or a 404, or if in the body I include more information than is currently copied to the error. I can make a PR if you want me to By the way nice lib.

iskandersierra avatar Mar 11 '20 16:03 iskandersierra

I would also like to see this modification included in the library! 💪

juangallostra avatar Mar 20 '20 10:03 juangallostra