You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When requesting names from the asset names endpoint I am sometimes receiving an HTML text response for a 400 status instead of JSON. This confuses my swagger client, which is expecting a JSON response according to specs. This issue prevents the swagger client to map the response to a proper error type and leads to generic errors (e.g. "undefined response type") , which make it very hard to debug.
This is happening with the goesi client, which is used a generated swagger client. This appears to be a known weakness of the swagger client 1. However, I would regard this still as a bug, since the endpoint violates its the specs
This issue very likely also effects other swagger clients. For example I have seen django-esi sometimes producing a generic OSError 2, instead of one of the expected ESI error exceptions for endpoints.
Side note: I am suspecting the 400 response here is not correct here, since the same request goes through fine just a few attempts later. But this is not what this issue is about.
Request
POST url=https://esi.evetech.net/v1/characters/93507995/assets/names/
method=POST url=https://esi.evetech.net/v1/characters/93507995/assets/names/ header="map[Accept:[application/json] Authorization:[Bearer TOKEN] Content-Type:[application/json]]" body="[1039639899207,1039639899210]\n"
The request is shortened for brevity. The actual request contains 1000 IDs.
Response
Status Code
400
Headers
Content-Length: "122"
Content-Type: "text/html"
Body
<html>\r\n<head><title>400 Bad Request</title></head>\r\n<body>\r\n<center><h1>400 Bad Request</h1></center>\r\n</body>\r\n</html>\r\n
Bug
When requesting names from the asset names endpoint I am sometimes receiving an HTML text response for a 400 status instead of JSON. This confuses my swagger client, which is expecting a JSON response according to specs. This issue prevents the swagger client to map the response to a proper error type and leads to generic errors (e.g. "undefined response type") , which make it very hard to debug.
This is happening with the goesi client, which is used a generated swagger client. This appears to be a known weakness of the swagger client 1. However, I would regard this still as a bug, since the endpoint violates its the specs
This issue very likely also effects other swagger clients. For example I have seen django-esi sometimes producing a generic OSError 2, instead of one of the expected ESI error exceptions for endpoints.
Side note: I am suspecting the 400 response here is not correct here, since the same request goes through fine just a few attempts later. But this is not what this issue is about.
Request
The request is shortened for brevity. The actual request contains 1000 IDs.
Response
Status Code
400
Headers
Body
Expected
Checklist
Check all boxes that apply to this issue:
Footnotes
See also https://github.com/swagger-api/swagger-codegen/issues/10997 ↩
See also https://gitlab.com/allianceauth/django-esi/-/issues/15 ↩
The text was updated successfully, but these errors were encountered: