Monorepo for Tangled
0

Configure Feed

Select the types of activity you want to include in your feed.

appview/oauth: improve logging for default knot failures

Signed-off-by: oppiliappan <me@oppi.li>

author
oppiliappan
date (Mar 9, 2026, 9:48 AM UTC) commit 35ec6890 parent 1b314963 change-id lnpzkpwn
+5 -1
+5 -1
appview/oauth/handler.go
··· 346 346 defer resp.Body.Close() 347 347 348 348 if resp.StatusCode != http.StatusOK { 349 - return fmt.Errorf("failed to add user to default service: HTTP %d", resp.StatusCode) 349 + var errorResponse map[string]any 350 + if err := json.NewDecoder(resp.Body).Decode(&errorResponse); err != nil { 351 + return fmt.Errorf("failed to add user to default service: HTTP %d (failed to decode error response: %w)", resp.StatusCode, err) 352 + } 353 + return fmt.Errorf("failed to add user to default service: HTTP %d, response: %v", resp.StatusCode, errorResponse) 350 354 } 351 355 352 356 return nil