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:
Anton Gunnarsson
2025-04-24 12:30:34 +00:00
parent 169094fc37
commit b354398c69
4 changed files with 12 additions and 9 deletions

View File

@@ -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" }
})