The automatic type-safe REST library for .NET Core, Xamarin and .NET. Heavily inspired by Square's Retrofit library, Refit turns your REST API into a live interface.
I have an API that returns a problem details when supplied inputs fail validation
I have a razor page application using the refit library to make api calls.
When the application posts data with invalid inputs an ApiException is caught, but not a ValidationApiException. If the ApiException has a content type "application/problem+json", a ValidationApiException should be thrown?
Describe the bug 🐞
A bug happened!
I have an API that returns a problem details when supplied inputs fail validation
I have a razor page application using the refit library to make api calls.
When the application posts data with invalid inputs an ApiException is caught, but not a ValidationApiException. If the ApiException has a content type "application/problem+json", a ValidationApiException should be thrown?
Step to reproduce
Reproduction repository
https://github.com/reactiveui/refit
Expected behavior
This should happen...
A ValidationException should be thrown with a content type application/problem+json
Screenshots 🖼️
No response
IDE
Visual Studio 2022
Operating system
Windows
Version
11
Device
No response
Refit Version
Refit.HttpClientFactory 7.0.0
Additional information ℹ️
No response