Originally Posted by Phanx
Using an API token instead of a cookie to upload a file, is it intended that there's no response body, and the only status codes returned are 200 (on a successful upload) or 00000 (for any error, which isn't even a valid HTTP status)?
It would be nice to get standard error codes like 404 (for missing/bad addon ID) or 403 (for missing/bad API token) and a message specifying the actual problem in other cases (missing/bad file, etc). For miscellaneous errors the CurseForge API gives a 422 (Unprocessable Entity) but there are plenty of 4xx statuses to choose from.
Also, to be pedantic, 201 (Created) or 202 (Accepted) would be more appropriate than 200 (OK).
|
We never had a body response when POSTing to the API unless there was an error, cookie or token. I'll add one.
When were you getting a 00000? You should get 40x's for missing token and other various errors? Not even sure how a 00000 could happen unless maybe our WAF is detecting something and doing something goofy, even then I've never seen it use those response codes?
Edit: you should now get a 202 and a response body when you successfully POST to the update endpoint.