mirror of
https://github.com/believethehype/nostdress.git
synced 2026-07-19 21:18:09 -07:00
error handling
This commit is contained in:
@@ -96,7 +96,7 @@ func handleLNURL(w http.ResponseWriter, r *http.Request) {
|
||||
return
|
||||
}
|
||||
|
||||
log.Info().Str("username", username).Str("domain", domain).Msg("got lnurl request")
|
||||
log.Debug().Str("username", username).Str("domain", domain).Msg("got lnurl request")
|
||||
|
||||
if amount := r.URL.Query().Get("amount"); amount == "" {
|
||||
// convert configured sendable amounts to integer
|
||||
|
||||
@@ -89,6 +89,7 @@ func GetNostrProfileMetaData(npub string) (nostr.ProfileMetadata, error) {
|
||||
url := "wss://relay.damus.io"
|
||||
relay, err := nostr.RelayConnect(ctx, url)
|
||||
if err != nil {
|
||||
cancel()
|
||||
return *metadata, err
|
||||
}
|
||||
|
||||
@@ -104,6 +105,7 @@ func GetNostrProfileMetaData(npub string) (nostr.ProfileMetadata, error) {
|
||||
Limit: 1,
|
||||
}}
|
||||
} else {
|
||||
cancel()
|
||||
return *metadata, err
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user