Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refit.ApiException: 'An error occured deserializing the response.' #1313

Open
Akomspatrick opened this issue Apr 2, 2024 · 0 comments
Open

Comments

@Akomspatrick
Copy link

I want to use refit to generate an sdk but am getting the error => : The JSON value could not be converted to LanguageExt.Either`2

this is my controller
[HttpGet(template: DocumentVersionManagerAPIEndPoints.Model.Get, Name =
DocumentVersionManagerAPIEndPoints.Model.Get)]
public Task Get(CancellationToken cToken) => _sender.Send(new GetAllModelQuery(), cToken).ToActionResult();

This is my refit interface
[Get("/api/v1/Models")]
Task<Either<GeneralFailure, ModelResponseDTO>> Get(CancellationToken cToken);
I also tried using [Get("/api/v1/Models")]
Task Get(CancellationToken cToken);

in both cases I got
An error occured deserializing the response.
Please I need help is there a way I can correctly have Either Result in my controller return type and still Use Refit for my SDK development ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant