refactor(ESISSO): enhance error handling during initialization and update startup logic in App
This commit is contained in:
7
app.go
7
app.go
@@ -36,7 +36,7 @@ func (a *App) startup(ctx context.Context) {
|
||||
}
|
||||
|
||||
// Add location read scope so we can fetch character locations
|
||||
a.ssi = NewESISSO(clientID, redirectURI, []string{
|
||||
ssi, err := NewESISSO(clientID, redirectURI, []string{
|
||||
"esi-location.read_location.v1",
|
||||
"esi-location.read_ship_type.v1",
|
||||
"esi-mail.organize_mail.v1",
|
||||
@@ -76,6 +76,11 @@ func (a *App) startup(ctx context.Context) {
|
||||
"esi-characters.read_titles.v1",
|
||||
"esi-characters.read_fw_stats.v1",
|
||||
})
|
||||
if err != nil {
|
||||
fmt.Printf("ERROR: Failed to initialize ESI SSO: %v\n", err)
|
||||
return
|
||||
}
|
||||
a.ssi = ssi
|
||||
}
|
||||
|
||||
// Greet returns a greeting for the given name
|
||||
|
||||
Reference in New Issue
Block a user