Skip to content

Commit

Permalink
Try to see response data
Browse files Browse the repository at this point in the history
  • Loading branch information
nkalupahana committed Sep 21, 2024
1 parent e0d78ba commit 25f6860
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions backend/src/accounts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,8 @@ export const getOrCreateKeys = async (req: UserRequest, res: Response) => {

const respData = await response.json();
if ("error" in respData || !("properties" in respData)) {
console.log(1);
console.log(respData);
const message = respData.error?.message?.toLowerCase();
if (message && message.includes("insufficient") && message.includes("scopes")) {
res.send(428);
Expand Down Expand Up @@ -174,6 +176,8 @@ export const getOrCreateKeys = async (req: UserRequest, res: Response) => {
const respData = await response.json();

if ("error" in respData || !("id" in respData)) {
console.log(2);
console.log(respData);
const message = respData.error?.message?.toLowerCase();
if (message && message.includes("insufficient") && message.includes("scopes")) {
res.send(428);
Expand Down

0 comments on commit 25f6860

Please sign in to comment.