Skip to content

Commit

Permalink
Merge branch 'PSG-4995-error-test' into feat-remove-delete-bool
Browse files Browse the repository at this point in the history
  • Loading branch information
tdeshong committed Nov 22, 2024
2 parents 18be227 + e2695c6 commit 0c3d256
Show file tree
Hide file tree
Showing 12 changed files with 2,601 additions and 428 deletions.
7 changes: 6 additions & 1 deletion app.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ func New(appID string, config *Config) (*App, error) {

app.jwksCacheSet = jwk.NewCachedSet(cache, url)

app.User = newAppUser(client, appID)
app.User = newAppUser(app)

return &app, nil
}
Expand All @@ -77,20 +77,25 @@ func (a *App) GetApp() (*AppInfo, error) {
}

var errorText string
var errorCode string
switch {
case res.JSON401 != nil:
errorText = res.JSON401.Error
errorCode = string(res.JSON401.Code)
case res.JSON404 != nil:
errorText = res.JSON404.Error
errorCode = string(res.JSON404.Code)
case res.JSON500 != nil:
errorText = res.JSON500.Error
errorCode = string(res.JSON500.Code)
}

return nil, Error{
Message: "failed to get Passage App Info",
StatusCode: res.StatusCode(),
StatusText: res.Status(),
ErrorText: errorText,
ErrorCode: errorCode,
}
}

Expand Down
Loading

0 comments on commit 0c3d256

Please sign in to comment.