-
Notifications
You must be signed in to change notification settings - Fork 18
Open
Description
For example:
curl -v -X 'POST' 'http://localhost:9740/sendtoaddress' \
-u :phoenixd_api_password \
-d 'amountSat=100000' \
-d 'address=invalid_address' \
-d 'feerateSatByte=12'
I get this error:
* Connected to localhost (127.0.0.1) port 9740 (#0)
* Server auth using Basic with user ''
> POST /sendtoaddress HTTP/1.1
> Host: localhost:9740
> Authorization: Basic ...
> User-Agent: curl/7.81.0
> Accept: */*
> Content-Length: 58
> Content-Type: application/x-www-form-urlencoded
>
* Mark bundle as not supporting multiuse
< HTTP/1.1 200 OK
< Content-Length: 15
< Content-Type: text/plain; charset=UTF-8
<
* Connection #0 to host localhost left intact
invalid address%
I get a 200 error code instead of a 400 (or 422)
For the /payinvoice endpoint, same thing.
Code change
| is ChannelCommand.Commitment.Splice.Response.Failure -> call.respondText(r.toString()) |
, status = ... probably in the respondText?
Workarounds
- for the
/sendtoaddressendpoint, I can check if the text reponse is a valid TX id - for the
/payinvoiceendpoint, I can check if the JSON response contains areasonfield
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels