mirror of
https://github.com/coder/coder.git
synced 2026-06-02 20:48:20 +00:00
fix: refresh all oauth links on external auth page (#11646)
* fix: refresh all oauth links on external auth page
This commit is contained in:
@@ -336,6 +336,10 @@ func ExpectJSONMime(res *http.Response) error {
|
||||
|
||||
// ReadBodyAsError reads the response as a codersdk.Response, and
|
||||
// wraps it in a codersdk.Error type for easy marshaling.
|
||||
//
|
||||
// This will always return an error, so only call it if the response failed
|
||||
// your expectations. Usually via status code checking.
|
||||
// nolint:staticcheck
|
||||
func ReadBodyAsError(res *http.Response) error {
|
||||
if res == nil {
|
||||
return xerrors.Errorf("no body returned")
|
||||
|
||||
Reference in New Issue
Block a user