chore: improve device handling error message (#11606)

This commit is contained in:
Steven Masley
2024-01-19 09:41:52 -06:00
committed by GitHub
parent 593a1e9f60
commit ccfd1a561b

View File

@ -327,7 +327,7 @@ func (c *DeviceAuth) AuthorizeDevice(ctx context.Context) (*codersdk.ExternalAut
case http.StatusTooManyRequests:
return nil, xerrors.New("rate limit hit, unable to authorize device. please try again later")
default:
return nil, err
return nil, fmt.Errorf("status_code=%d: %w", resp.StatusCode, err)
}
}
if r.ErrorDescription != "" {