Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
This pull request has been ignored for the connected project Preview Branches by Supabase. |
| queryClient.fetchQuery(allMintKeysetsQueryOptions(mintUrl)), | ||
| ]); | ||
| return { success: true, data: { mintInfo, keysets: allKeysets.keysets } }; | ||
| } catch (error) { |
There was a problem hiding this comment.
@gudnuf cashu-ts returns NetworkError instance for these errors but unfortunately the error is useless because it just gives us the generic message. Ideally we should be able to distinct error codes so we can know if the mint is not found or maybe in case of 500 error that it's just temporarily down. Because of this I used generic message that covers both cases.
There was a problem hiding this comment.
There's HttpResponseError too. This is from request.ts. It should throw HttpResponse error if it got a response and NetworkError if fetch failed
There was a problem hiding this comment.
If you enter a real mint url, but its offline it will be network error with no status? We don't know whether this means its a real mint or not, so I'd say your current error message is good for network errors.
Can you catch HttpResponseErrors for the case where you input valid url that returns a 404? Then we know its not a valid mint
There was a problem hiding this comment.
I am not sure if that will even work. E.g. this dalmatinskiportal.hr that I tried is a local news site and it did return 404 but cashu-ts still threw NetworkError.
325828e to
1dd24d6
Compare

Fixes this Sentry error
We had a bug where if user enters a wrong url when adding a mint, or if the mint is temporarily down, the validation would error, we'd get an error log but the button would just keep spinning for the user.