nutshell icon indicating copy to clipboard operation
nutshell copied to clipboard

[Mint] /checkstate endpoint returns raw SQL error, instead of error code / message

Open Egge21M opened this issue 1 year ago • 1 comments

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

Egge21M avatar Feb 16 '24 08:02 Egge21M

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"}

Egge21M avatar Feb 16 '24 09:02 Egge21M