You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(POR-22649): handle app-setup entity errors in notification-center
Add defensive error handling on /notification-center so platform API
failures (e.g. "No entity type for app-setup found") show a user-friendly
SilentError instead of an unhandled Next.js request error in Sentry.
Co-authored-by: Neil Raina <makeitraina@users.noreply.github.com>
Copy file name to clipboardExpand all lines: src/app/notification-center/page.tsx
+15-6Lines changed: 15 additions & 6 deletions
Original file line number
Diff line number
Diff line change
@@ -9,9 +9,9 @@ async function getNotificationDetail(token: string) {
9
9
constcopilot=newCopilotAPI(token)
10
10
consttokenPayload=awaitcopilot.getTokenPayload()
11
11
12
-
if(!tokenPayload)thrownewError('Failed to get token payload')
12
+
if(!tokenPayload?.notificationId)returnnull
13
13
14
-
returnawaitcopilot.getIUNotification(z.string().parse(tokenPayload.notificationId),tokenPayload.workspaceId)// notification "id" is expected in tokenPayload
0 commit comments