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

artist lookup inc=url-rels sometimes returns xml instead of json #241

Closed
lydavid opened this issue Jun 18, 2023 · 5 comments
Closed

artist lookup inc=url-rels sometimes returns xml instead of json #241

lydavid opened this issue Jun 18, 2023 · 5 comments
Labels
bug Something isn't working

Comments

@lydavid
Copy link
Owner

lydavid commented Jun 18, 2023

This only started happening after we changed the initial lookup to include url-rels

Screenshot 2023-06-18 184242 xml

@lydavid lydavid added the bug Something isn't working label Jun 18, 2023
@lydavid
Copy link
Owner Author

lydavid commented Sep 2, 2023

Still happens with ktor (though we are using OkHttp engine).

Should be handled with this. A retry or two by the http client will usually work

is NoTransformationFoundException -> {
                Timber.e(exception)
                throw RecoverableNetworkException("Requested json but got xml")
            }

@lydavid lydavid added the handled Issue is temporarily handled by workaround label Sep 5, 2023
@lydavid
Copy link
Owner Author

lydavid commented Sep 6, 2023

It's actually not handled because receiving XML is 200, so that block is not executed

I removed the double application/json header. Maybe that might do something?

@lydavid lydavid removed the handled Issue is temporarily handled by workaround label Sep 6, 2023
@lydavid
Copy link
Owner Author

lydavid commented Sep 6, 2023

Still sometimes get XML

@lydavid
Copy link
Owner Author

lydavid commented Sep 12, 2023

Checked with postman, and sometimes I would receive xml. So the issue isn't okhttp

lydavid pushed a commit that referenced this issue Oct 1, 2023
@lydavid
Copy link
Owner Author

lydavid commented Nov 26, 2023

After adding fmt=json to url, I haven't seen this issue again

@lydavid lydavid closed this as completed Nov 26, 2023
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