nutshell
nutshell copied to clipboard
[Mint] /checkstate endpoint returns raw SQL error, instead of error code / message
Title is self explanatory. Below a test with the minibits mint.
$ curl https://mint.minibits.cash/Bitcoin/v1/checkstate -X POST -H "Content-type: application/json" -d '{"secrets":[]}'
>> {"detail":"(psycopg2.errors.SyntaxError) syntax error at or near \")\"\nLINE 3: WHERE Y IN ()\n ^\n\n[SQL: \n SELECT * from cashu.proofs_pending\n WHERE Y IN ()\n ]\n(Background on this error at: http://sqlalche.me/e/13/f405)"}%
Will investigate if any other endpoints show this behaviour
Update: Melting seems to work just fine. I guess because there is no db action required.
{"detail":"not enough inputs provided for melt. Provided: 0, needed: 23"}