refactor(ESISSO): enhance error handling during initialization and update startup logic in App

This commit is contained in:
2025-11-20 22:55:07 +01:00
parent 2c0134ed4d
commit d27d54804a
2 changed files with 31 additions and 8 deletions

7
app.go
View File

@@ -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