sandwichfarm / nostr-watch

nostr registry and monitor web-client
https://nostr.watch
MIT License
180 stars 484 forks source link

API Internal Server Error #510

Closed tcheeric closed 1 year ago

tcheeric commented 1 year ago

Describe the bug When using the API to list all relays supporting NIP-58, you get an Internal Server Error and the browser returns a blank screen.

To Reproduce Steps to reproduce the behavior:

  1. Open the browser dev tool
  2. Select the Network tab
  3. Go to https://api.nostr.watch/v1/nip/58
  4. Select the '58' request (see screenshot below)

Expected behavior The request returns a JSON array of all relays supporting the NIP-58.

Screenshots https://nostr.build/p/nb3253.png

Desktop (please complete the following information):

Additional context The issue might be reproducible with other NIPs. Strangely, the response is returned with an HTTP 200 code, instead of 500.

dskvr commented 1 year ago

Can you provide a single relay that is flagging NIP-58 support? I cannot find a single one (checked ~100 relays). Provided a relay that is flagging support I will be more easily able to diagnose the issue,

dskvr commented 1 year ago

Additionally, the 200 internal server error is indeed a bug as an empty response should provide a different code. Will correct this within the next week.

dskvr commented 1 year ago

~Since you've posted this, some relays have begun to report NIP-50 support.~

~https://api.nostr.watch/v1/nip/50~

Oops, you wanted NIP-58. Still not seeing anyone reporting NIP-58 support.

The error code is still incorrect, so I will leave it open.

tcheeric commented 1 year ago

@dskvr I was told that NIP-58 "is more a client side thing," i.e. relays do not signal NIP-58 at all. Thanks.