aptos-core icon indicating copy to clipboard operation
aptos-core copied to clipboard

[API] Return better error from events handle endpoint

Open banool opened this issue 3 years ago • 0 comments

As it is now, this call returns a 400 with an empty response for some reason:

curl -v 'http://127.0.0.1:8080/v1/accounts/0x1/events/0x1::coin_store::CoinStore<0x1::coin::AptosCoin>/withdraw_events'
*   Trying 127.0.0.1:8080...
* Connected to 127.0.0.1 (127.0.0.1) port 8080 (#0)
> GET /v1/accounts/0x1/events/0x1::coin_store::CoinStore<0x1::coin::AptosCoin>/withdraw_events HTTP/1.1
> Host: 127.0.0.1:8080
> User-Agent: curl/7.79.1
> Accept: */*
>
* Mark bundle as not supporting multiuse
< HTTP/1.1 400 Bad Request
< content-length: 0
< date: Fri, 09 Sep 2022 01:19:36 GMT
<
* Connection #0 to host 127.0.0.1 left intact

As part of this, we must provide better documentation for what field_name is. I think field_name itself is a confusing name.

banool avatar Sep 09 '22 01:09 banool