fix: refresh all oauth links on external auth page (#11646)

* fix: refresh all oauth links on external auth page
This commit is contained in:
Steven Masley
2024-01-16 11:03:55 -06:00
committed by GitHub
parent d583acad00
commit 08b4eb3124
5 changed files with 85 additions and 11 deletions
+4
View File
@@ -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")