-
Notifications
You must be signed in to change notification settings - Fork 314
New issue
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
fix: access_denied error handling for OAuth destinations #3853
Conversation
Signed-off-by: Sai Sankeerth <sanpj2292@github.com>
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 <sanpj2292@github.com>
}, | ||
} | ||
stCode, response := api.OAuth.UpdateAuthStatusToInactive(dest, job.WorkspaceID, oAuthDetail.id) | ||
jobStatus.Status = model.JobStatusAborted |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't this be JobStatusUndefined
if stCode != http.StatusOK
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fmt.Printf("I'm here!!!! Some shitty response!!") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@sanpj2292 this is still here 🙂
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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