Skip to content

Conversation

@stalep
Copy link
Member

@stalep stalep commented Feb 6, 2025

Make sure to encode 202 responses as json.

@lampajr
Copy link
Member

lampajr commented Feb 6, 2025

Hi @stalep, I am not that sure this enough because the returned object (if we use json) should be a JSON array and not a comma separated string of ids.

Another thing is that, if we want to change from text to json, I would try to ensure the endpoint always return JSON regardless of the http code. wdyt?

NOTE: not sure but the UI might be affected by this change, in the past I had to explicitly set the content type to be tet plain otherwise the UI was failing to parse the response

@stalep stalep marked this pull request as draft February 6, 2025 12:26
@stalep
Copy link
Member Author

stalep commented Feb 6, 2025

Hi @stalep, I am not that sure this enough because the returned object (if we use json) should be a JSON array and not a comma separated string of ids.

Another thing is that, if we want to change from text to json, I would try to ensure the endpoint always return JSON regardless of the http code. wdyt?

Yes, I did not mean to do a pr here really, the idea was to make it as a draft and discuss the two points you mentions :)
I was looking at debugging the restassured objects to look at the payload last night as I was playing with the Response, but it was a bit hard to see the entire response, I need to stand up Horreum to do that more easily.

NOTE: not sure but the UI might be affected by this change, in the past I had to explicitly set the content type to be tet plain otherwise the UI was failing to parse the response

Yes, most likely which also was why I just wanted this as a draft.

@stalep stalep closed this Nov 24, 2025
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

Successfully merging this pull request may close these issues.

2 participants