Skip to content

Conversation

@heifner
Copy link
Contributor

@heifner heifner commented Jun 17, 2025

Report a more descriptive error for a host that is not found for /v1/net/status.

Before (Note http return code was 201):

✗ ./cleos net status foo
Error 3200005: http request fail
Error Details:
Error code 201
: null

Now (http return code of 201):

✗ ./cleos net status foo
"connection not found: foo"
✗ curl -s -v http://127.0.0.1:8888/v1/net/status -d"foo" | jq
*   Trying 127.0.0.1:8888...
* Connected to 127.0.0.1 (127.0.0.1) port 8888 (#0)
> POST /v1/net/status HTTP/1.1
> Host: 127.0.0.1:8888
> User-Agent: curl/7.81.0
> Accept: */*
> Content-Length: 3
> Content-Type: application/x-www-form-urlencoded
>
} [3 bytes data]
* Mark bundle as not supporting multiuse
< HTTP/1.1 201 Created
< Server: nodeos/v1.3.0-dev
< Content-Type: application/json
< Content-Length: 27
<
{ [27 bytes data]
* Connection #0 to host 127.0.0.1 left intact
"connection not found: foo"

Resolves #1587

@heifner heifner requested review from greg7mdp and linh2931 June 17, 2025 13:19
@heifner heifner added the OCI Work exclusive to OCI team label Jun 17, 2025
@heifner heifner marked this pull request as draft June 17, 2025 14:18
@heifner heifner marked this pull request as ready for review June 17, 2025 16:53
@heifner heifner merged commit bea26aa into main Jun 17, 2025
36 checks passed
@heifner heifner deleted the GH-1587-net-status-error branch June 17, 2025 18:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

OCI Work exclusive to OCI team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

P2P: Better error when status not found

4 participants