-
Notifications
You must be signed in to change notification settings - Fork 62
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: support expired preview token API error
- Loading branch information
1 parent
163d03e
commit 66c33d0
Showing
4 changed files
with
85 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import { ForbiddenError } from "./ForbiddenError"; | ||
|
||
type PreviewTokenExpiredErrorAPIResponse = { | ||
type: "api_security_error"; | ||
message: string; | ||
}; | ||
|
||
// This error extends `ForbiddenError` for backwards compatibility. | ||
// TODO: Extend this error from `PrismicError` in v8. | ||
export class PreviewTokenExpiredError< | ||
TResponse = PreviewTokenExpiredErrorAPIResponse, | ||
> extends ForbiddenError<TResponse> {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters