Skip to content

Commit 894a09d

Browse files
Adelbert ChangAdelbert Chang
authored andcommitted
Moar error messages
1 parent f3da469 commit 894a09d

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

  • src/github.com/getnelson/nelson

src/github.com/getnelson/nelson/login.go

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,9 @@ package main
1818

1919
import (
2020
"encoding/json"
21+
"fmt"
2122
"github.com/parnurzeal/gorequest"
23+
"os"
2224
)
2325

2426
type CreateSessionRequest struct {
@@ -67,7 +69,10 @@ func createSession(client *gorequest.SuperAgent, githubToken string, baseURL str
6769
EndBytes()
6870

6971
if len(errs) > 0 {
70-
panic(errs)
72+
for _, err := range errs {
73+
fmt.Fprintln(os.Stderr, fmt.Sprintf("%+v", err))
74+
}
75+
panic("Error trying to login to Nelson!")
7176
}
7277

7378
var result Session

0 commit comments

Comments
 (0)