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
I'm using refit to call a Web API.
My Web Api doesn't throw exceptions but handles Validation, Not founds, already exists, etc... with Result objects (I'm using the library Fluent Results btw).
My result object has an Error property which is populated whenever an Error occurs.
Based on this I return a 40X.
How can I customize the ReasonPhrase of the Refit APIResponse to reflect the Error Property of my result object?
In other words how can I customize the ReasonPhrase of Refit ApiResponse to send more meaningfull error message to my frontend?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hi,
I'm using refit to call a Web API.
My Web Api doesn't throw exceptions but handles Validation, Not founds, already exists, etc... with Result objects (I'm using the library Fluent Results btw).
My result object has an Error property which is populated whenever an Error occurs.
Based on this I return a 40X.
How can I customize the ReasonPhrase of the Refit APIResponse to reflect the Error Property of my result object?
In other words how can I customize the ReasonPhrase of Refit ApiResponse to send more meaningfull error message to my frontend?
Thanks for your help
Beta Was this translation helpful? Give feedback.
All reactions