File tree Expand file tree Collapse file tree 2 files changed +4
-3
lines changed
Expand file tree Collapse file tree 2 files changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -11,7 +11,7 @@ type DecodedIdToken = admin.DecodedIdToken;
1111// THROWS: if idToken is not present in request cookie, or when the token is not valid.
1212export async function getGUID ( c : Context ) : Promise < GUID > {
1313 const idToken = c . req . header ( "Authorization" ) ;
14- if ( typeof idToken !== "string" ) error ( "token not found in query " , 401 ) ;
14+ if ( typeof idToken !== "string" ) error ( "token not found in header " , 401 ) ;
1515 return await getGUIDFromToken ( idToken ) ;
1616}
1717
Original file line number Diff line number Diff line change @@ -30,9 +30,10 @@ if (corsOptions.origin.length > 1) {
3030const app = new Hono ( )
3131 . onError ( ( err , c ) => {
3232 if ( err instanceof HTTPException ) {
33- throw err ;
33+ console . log ( err ) ;
34+ return c . json ( { error : err . message } , err . status ) ;
3435 }
35- console . log ( err ) ;
36+ console . error ( err ) ;
3637 return c . json ( { error : err } , 500 ) ;
3738 } )
3839
You can’t perform that action at this time.
0 commit comments