Repository navigation
fix: access_denied error handling for OAuth destinations - #3853
Conversation
Signed-off-by: Sai Sankeerth <[email protected]>
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## master #3853 +/- ##
==========================================
+ Coverage 70.40% 70.67% +0.26%
==========================================
Files 357 357
Lines 53646 53671 +25
==========================================
+ Hits 37771 37933 +162
+ Misses 13612 13477 -135
+ Partials 2263 2261 -2
☔ View full report in Codecov by Sentry. |
Signed-off-by: Sai Sankeerth <[email protected]>
| }, | ||
| } | ||
| stCode, response := api.OAuth.UpdateAuthStatusToInactive(dest, job.WorkspaceID, oAuthDetail.id) | ||
| jobStatus.Status = model.JobStatusAborted |
There was a problem hiding this comment.
Shouldn't this be JobStatusUndefined if stCode != http.StatusOK?
There was a problem hiding this comment.
What does JobStatusUndefined signify in terms of regulation functionality ?
| // Lint error fix | ||
| _, err := w.Write([]byte(cpResp.response)) | ||
| if err != nil { | ||
| fmt.Printf("I'm here!!!! Some shitty response!!") |
There was a problem hiding this comment.
| fmt.Printf("I'm here!!!! Some shitty response!!") |
There was a problem hiding this comment.
I am searching in my IDE, this is not found. Not sure if I'm missing something here 😅
|
|
||
| srvMux.HandleFunc("/workspaces/{workspaceId}/destinations/{destinationId}/authStatus/toggle", func(w http.ResponseWriter, req *http.Request) { | ||
| if req.Method != http.MethodPut { | ||
| w.WriteHeader(http.StatusNotFound) |
There was a problem hiding this comment.
Wouldn't "Method Not Allowed" make more sense? I know it's a test, but is this test reflecting real behaviour?
| w.WriteHeader(http.StatusNotFound) | |
| w.WriteHeader(http.StatusMethodNotAllowed) |
| param := chi.URLParam(req, reqParam) | ||
| if param == "" { | ||
| // This case wouldn't occur I guess | ||
| http.Error(w, fmt.Sprintf("Wrong url being sent: %v", reqParam), http.StatusInternalServerError) |
There was a problem hiding this comment.
If the server gets an empty parameter, isn't that a Bad Request rather than a 500?
…ant error while refreshing the token
- include relevant status-codes - remove unnecessary printf statements
…ilure & success) - refactor authStatus toggle handling in deleteUsers - correction of test-cases in deleteUsers
…)" This reverts commit 0d30d3b.
Description
https://github.com/rudderlabs/rudder-config-backend/pull/3643
Linear Ticket
Resolves INT-367
https://linear.app/rudderstack/issue/INT-367/testing-review-and-release
Security