We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Branch/Environment
master
Describe the bug Panics are being thrown in the SSO process when there is some invalid Dashboard config set.
Reproduction steps
TykApi.DashboardConfig
/admin/sso
Actual behaviour TIB panics.
Expected behaviour This section should return a clear error if creating the request returns an error:
tyk-identity-broker/tyk-api/tyk_api.go
Lines 205 to 209 in 34d1bf5
Screenshots/Video
Browser/Os (please complete the following information):
Additional context Related to an issue occurring in Ara & Tyk Dashboard.
The text was updated successfully, but these errors were encountered:
Something like this should cover it off:
diff --git a/tyk-api/tyk_api.go b/tyk-api/tyk_api.go index c78d87d..8425a96 100644 --- a/tyk-api/tyk_api.go +++ b/tyk-api/tyk_api.go @@ -202,10 +202,10 @@ func (t *TykAPI) DispatchDashboardSuper(target Endpoint, method string, body io. preparedEndpoint := t.DashboardConfig.Endpoint + ":" + t.DashboardConfig.Port + string(target) tykAPILogger.Debug("Calling: ", preparedEndpoint) - newRequest, err := http.NewRequest(method, preparedEndpoint, body) - if err != nil { - tykAPILogger.Error("Failed to create request") - tykAPILogger.Error(err) + newRequest, errNewReq := http.NewRequest(method, preparedEndpoint, body) + if errNewReq != nil { + tykAPILogger.WithError(errNewReq).Error("failed to create request") + return []byte{}, http.StatusInternalServerError, errNewReq } newRequest.Header.Add("admin-auth", t.DashboardConfig.AdminSecret)
Sorry, something went wrong.
Fixed in #120
sredxny
No branches or pull requests
Branch/Environment
master
(34d1bf5)Describe the bug
Panics are being thrown in the SSO process when there is some invalid Dashboard config set.
Reproduction steps
TykApi.DashboardConfig
/admin/sso
endpointActual behaviour
TIB panics.
Expected behaviour
This section should return a clear error if creating the request returns an error:
tyk-identity-broker/tyk-api/tyk_api.go
Lines 205 to 209 in 34d1bf5
Screenshots/Video
Browser/Os (please complete the following information):
Additional context
Related to an issue occurring in Ara & Tyk Dashboard.
The text was updated successfully, but these errors were encountered: