ordinals / ord

👁‍🗨 Rare and exotic sats
https://ordinals.com
Creative Commons Zero v1.0 Universal
3.85k stars 1.38k forks source link

Non-existant output lookups return 500 error #3919

Closed casey closed 1 month ago

casey commented 2 months ago

For example:

https://ordinals.com/output/0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef:123

This is because the JSON RPC status code / message for output not found was changed, so we don't correctly transform it into a 404 not found HTTP error.

cryptoni9n commented 1 month ago

When reproduced in the env terminal I see this error:

error serving request: JSON-RPC error: RPC error response: RpcError { code: -5, message: "No such mempool or blockchain transaction. Use gettransaction for wallet transactions.", data: None }

I hope this information will help in getting to the bottom of it. I looked into the code and wasn't able to get very far in fixing it.

raphjaph commented 1 month ago

I think this might fix it: https://github.com/ordinals/ord/pull/3968