Merged in fix/improve-sas-error-logging (pull request #1854)
Improve SAS flow logging * Improve logging Approved-by: Joakim Jäderberg
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
import * as Sentry from "@sentry/nextjs"
|
||||
import { z } from "zod"
|
||||
|
||||
import * as api from "@/lib/api"
|
||||
@@ -59,9 +60,9 @@ export const linkAccount = protectedProcedure
|
||||
return { linkingState: "alreadyLinked" }
|
||||
}
|
||||
|
||||
console.log(
|
||||
`[SAS] link account error with status code ${apiResponse.status} and response ${await apiResponse.text()}`
|
||||
)
|
||||
const errorMessage = `[SAS] link account error with status code ${apiResponse.status} and response ${await apiResponse.text()}`
|
||||
console.warn(errorMessage)
|
||||
Sentry.captureMessage(errorMessage)
|
||||
return { linkingState: "error" }
|
||||
})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user