mirror of
https://github.com/christianselig/apollo-backend
synced 2024-12-22 14:25:28 +00:00
fix bugsnag exception
This commit is contained in:
parent
5e2a846bc1
commit
eaf6a707ca
1 changed files with 5 additions and 1 deletions
|
@ -70,11 +70,15 @@ func (a *api) createWatcherHandler(w http.ResponseWriter, r *http.Request) {
|
|||
}
|
||||
|
||||
accs, err := a.accountRepo.GetByAPNSToken(ctx, apns)
|
||||
if err != nil || len(accs) == 0 {
|
||||
if err != nil {
|
||||
a.errorResponse(w, r, 422, err.Error())
|
||||
return
|
||||
}
|
||||
|
||||
if len(accs) == 0 {
|
||||
a.errorResponse(w, r, 422, "can't create watchers without accounts")
|
||||
}
|
||||
|
||||
account := accs[0]
|
||||
found := false
|
||||
for _, acc := range accs {
|
||||
|
|
Loading…
Reference in a new issue