nip11: catch one error that wasn't.

This commit is contained in:
fiatjaf
2025-09-24 07:38:17 -03:00
parent 3c540e726e
commit adcab08bd7

View File

@@ -34,7 +34,10 @@ func Fetch(ctx context.Context, u string) (info RelayInformationDocument, err er
}
// make request
req, _ := http.NewRequestWithContext(ctx, "GET", "http"+u[2:], nil)
req, err := http.NewRequestWithContext(ctx, "GET", "http"+u[2:], nil)
if err != nil {
return info, fmt.Errorf("invalid request")
}
// add the NIP-11 header
req.Header.Add("Accept", "application/nostr+json")