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

FlowConverterFacotry: java.util.NoSuchElementException: List is empty. #511

Open
ahmadmssm opened this issue Jan 8, 2024 · 2 comments
Open
Labels
bug Something isn't working

Comments

@ahmadmssm
Copy link

Ktorfit version

1.11.1

What happened and how can we reproduce this issue?

I didn't find the FlowConverterFactory in the last version as I previously reported, so I copied it from the Repo but when trying to parse any response it falls at this line
val response = getResponse()
with this error
java.util.NoSuchElementException: List is empty.

What did you expect to happen?

The parsing to success as in the previous versions.

Is there anything else we need to know about?

No response

@ahmadmssm ahmadmssm added the bug Something isn't working label Jan 8, 2024
@ahmadmssm
Copy link
Author

I rolled back to a previous build and both bugs were not reproducible.

@ahmadmssm
Copy link
Author

The issue is here

  if (requestType.typeInfo.type == HttpResponse::class)
                            emit(getResponse())

if I add more than one response converter, it will jump automatically when I call getResponse() to the other response converter, if there is only one converter, then it will work as expected.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant