diff options
author | 2021-02-17 00:03:01 +0300 | |
---|---|---|
committer | 2021-02-17 08:00:55 +0300 | |
commit | fdb06b409e4f6853d05ab77783659a79b6022e1f (patch) | |
tree | dbc1d5560107163f1946afb2101b242e005871ba | |
parent | Cleans Up Error Display (diff) |
Cleans Up OAuth Error Logging
Signed-off-by: Hassan Abouelela <[email protected]>
-rw-r--r-- | src/components/OAuth2Button.tsx | 16 |
1 files changed, 2 insertions, 14 deletions
diff --git a/src/components/OAuth2Button.tsx b/src/components/OAuth2Button.tsx index b084571..1ee456c 100644 --- a/src/components/OAuth2Button.tsx +++ b/src/components/OAuth2Button.tsx @@ -56,20 +56,8 @@ async function login(props: OAuth2ButtonProps, errorDialog: React.RefObject<HTML } // Propagate to sentry - const error = reason.Error; - error["Custom Error Message"] = reason.Message; - - // Filter Discord code - if (error?.config?.data) { - const data = JSON.parse(error.config.data); - if (data["token"]) { - data["token"] = "[FILTERED]"; - } - - error.config.data = data; - } - - throw error; + reason.Error.stack = new Error(`OAuth: ${reason.Message}`).stack + "\n" + reason.Error.stack; + throw reason.Error; }); if (checkScopes(props.scopes, props.path)) { |