mirror of
https://github.com/getAlby/hub.git
synced 2026-08-13 12:33:39 +02:00
fix: missing error handling in create connection controller (#2335)
This commit is contained in:
parent
dd04326f76
commit
ee001d16b4
1 changed files with 11 additions and 0 deletions
|
|
@ -104,6 +104,17 @@ func (controller *nip47Controller) HandleCreateConnectionEvent(ctx context.Conte
|
|||
|
||||
scopes, err := permissions.RequestMethodsToScopes(params.RequestMethods)
|
||||
|
||||
if err != nil {
|
||||
logger.Logger.WithFields(logrus.Fields{
|
||||
"request_event_id": requestEventId,
|
||||
}).WithError(err).Error("Failed to convert request methods to scopes")
|
||||
publishResponse(&models.Response{
|
||||
ResultType: nip47Request.Method,
|
||||
Error: mapNip47Error(err),
|
||||
}, nostr.Tags{})
|
||||
return
|
||||
}
|
||||
|
||||
supportedNotificationTypes := controller.lnClient.GetSupportedNIP47NotificationTypes()
|
||||
if len(params.NotificationTypes) > 0 {
|
||||
if slices.ContainsFunc(params.NotificationTypes, func(method string) bool {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue