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
http://127.0.0.1:5001/api/v0/dns/example.com returns HTTP 500 Internal Server Error (meaning that the API server failed to fulfill the request) even for successful requests. The body clarifies that the request actually worked as expected: {"Message":"could not resolve name","Code":0,"Type":"error"}.
The expected response code is HTTP 200 OK as everything worked as expected. The API call did actually succeed and return the expected result.
The text was updated successfully, but these errors were encountered:
I'd be against HTTP-200 as that would be misleading as well, better fits would be:
204 - no content
422 - Unprocessable Entity
I'd suggest using 204, as that one clearly indicates that the API itself is OK but that no ipfs content could be found for the requested dns entry. Therefore no body parsing is required, and load on server and client can be minimized, as only the http status needs to be checked.
Version information:
go-ipfs version: 0.4.18-
Repo version: 7
System version: amd64/windows
Golang version: go1.11.1
Type:
bug
Description:
http://127.0.0.1:5001/api/v0/dns/example.com
returns HTTP 500 Internal Server Error (meaning that the API server failed to fulfill the request) even for successful requests. The body clarifies that the request actually worked as expected:{"Message":"could not resolve name","Code":0,"Type":"error"}
.The expected response code is HTTP 200 OK as everything worked as expected. The API call did actually succeed and return the expected result.
The text was updated successfully, but these errors were encountered: