File tree Expand file tree Collapse file tree 1 file changed +15
-0
lines changed
Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -241,6 +241,16 @@ import { getCtsToken } from '@cipherstash/nextjs'
241241export default async function Page() {
242242 const ctsToken = await getCtsToken ()
243243
244+ // getCtsToken returns either
245+ // ---
246+ // { success: true, ctsToken: CtsToken }
247+ // or
248+ // { success: false, error: string }
249+
250+ if (! ctsToken .success ) {
251+ // handle error
252+ }
253+
244254 return (
245255 <div >
246256 <h1 >Server side rendered page < / h1 >
@@ -259,6 +269,11 @@ import { getCtsToken } from '@cipherstash/nextjs'
259269
260270export default async function Page() {
261271 const ctsToken = await getCtsToken ()
272+
273+ if (! ctsToken .success ) {
274+ // handle error
275+ }
276+
262277 const lockContext = new LockContext ({
263278 ctsToken
264279 })
You can’t perform that action at this time.
0 commit comments