Timestamp token debug files so I can view them all
This commit is contained in:
parent
ddb204995f
commit
4198f18d94
1 changed files with 2 additions and 1 deletions
|
|
@ -604,7 +604,8 @@ func handleTokenRequest(ctx context.Context, req *http.Request) (*OAuthTokenResp
|
|||
defer resp.Body.Close()
|
||||
bodyBytes, err := io.ReadAll(resp.Body)
|
||||
slog.Info("Token request", slog.Int("status", resp.StatusCode))
|
||||
saveResponse(bodyBytes, "token.json")
|
||||
filename := newTimestampedFilename("token", ".json")
|
||||
saveResponse(bodyBytes, filename)
|
||||
if resp.StatusCode >= http.StatusBadRequest {
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("Got status code %d and failed to read response body: %v", resp.StatusCode, err)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue