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
By default the process function the typescript client uses A server side error occurred for all expected errors. In the case of 400, and 403 this doesn't really make sense. So I would like to change the message used to more closely resemble the error code.
From looking at the Client.ProcessResponse.HandleStatusCode template, it looks like it uses an response.ExceptionDescription property. This is nice for making changes to individual endpoints. But it would be nice if there was a way to say if it is a 403 default the description to "Forbidden" or something more related to the httpCode. Otherwise, I am copy and pasting the same strings everywhere.
By default the
process
function the typescript client usesA server side error occurred
for all expected errors. In the case of 400, and 403 this doesn't really make sense. So I would like to change the message used to more closely resemble the error code.From looking at the Client.ProcessResponse.HandleStatusCode template, it looks like it uses an
response.ExceptionDescription
property. This is nice for making changes to individual endpoints. But it would be nice if there was a way to say if it is a 403 default the description to "Forbidden" or something more related to the httpCode. Otherwise, I am copy and pasting the same strings everywhere.Is there a way I can do this in my configuration? Or would I need to override the whole template:
https://github.com/RicoSuter/NSwag/blob/master/src/NSwag.CodeGeneration.TypeScript/Templates/Client.ProcessResponse.HandleStatusCode.liquid
Thanks,
~Shea M
The text was updated successfully, but these errors were encountered: