Skip to content

Commit

Permalink
fix(auth): update HTTPException to use ContentfulStatusCode for error…
Browse files Browse the repository at this point in the history
… handling
  • Loading branch information
schettn authored Jan 9, 2025
1 parent 40ccf3c commit 1b8325b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/pylon/src/auth/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import jwt from 'jsonwebtoken'
import type {IdTokenClaims, IntrospectionResponse} from 'openid-client'
import path from 'path'
import {HTTPException} from 'hono/http-exception'
import {StatusCode} from 'hono/utils/http-status'
import {ContentfulStatusCode} from 'hono/utils/http-status'
import {env} from 'hono/adapter'
import * as Sentry from '@sentry/bun'
import {existsSync, readFileSync} from 'fs'
Expand Down Expand Up @@ -283,7 +283,7 @@ const authRequire = (checks: AuthRequireChecks = {}) => {
}
})

throw new HTTPException(resError.status as StatusCode, {res: resError})
throw new HTTPException(resError.status as ContentfulStatusCode, {res: resError})
}
}

Expand Down

1 comment on commit 1b8325b

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Deploy preview for pylon-docs ready!

✅ Preview
https://pylon-docs-m9e2w39az-schettns-projects.vercel.app

Built with commit 1b8325b.
This pull request is being automatically deployed with vercel-action

Please sign in to comment.