Some checks failed
CI / go (push) Waiting to run
CI / docker (push) Waiting to run
CI / lint-go (push) Waiting to run
CI / lint-docs (push) Waiting to run
CI / check-paperclip (push) Waiting to run
Deploy static site / Deploy to GitHub Pages (push) Has been cancelled
Deploy static site / Deploy via Docker to hatch.surf (push) Has been cancelled
Resolved conflicts by taking GitHub versions for: - .dockerignore, .gitignore, Dockerfile, README.md, docker-compose.yml Kept deploy.sh updated to: - Pull from GitHub (primary source) - Push to Gitea (push-mirror) - Build from site/ directory (GitHub structure) Co-Authored-By: Paperclip <noreply@paperclip.ing>
20 lines
914 B
TypeScript
20 lines
914 B
TypeScript
export declare const HTTPAccessErrorStatus: {
|
|
NOT_FOUND: number;
|
|
FORBIDDEN: number;
|
|
UNAUTHORIZED: number;
|
|
};
|
|
export declare const HTTP_ERROR_FALLBACK_ERROR_CODE = "NEXT_HTTP_ERROR_FALLBACK";
|
|
export type HTTPAccessFallbackError = Error & {
|
|
digest: `${typeof HTTP_ERROR_FALLBACK_ERROR_CODE};${string}`;
|
|
};
|
|
/**
|
|
* Checks an error to determine if it's an error generated by
|
|
* the HTTP navigation APIs `notFound()`, `forbidden()` or `unauthorized()`.
|
|
*
|
|
* @param error the error that may reference a HTTP access error
|
|
* @returns true if the error is a HTTP access error
|
|
*/
|
|
export declare function isHTTPAccessFallbackError(error: unknown): error is HTTPAccessFallbackError;
|
|
export declare function getAccessFallbackHTTPStatus(error: HTTPAccessFallbackError): number;
|
|
export declare function getAccessFallbackErrorTypeByStatus(status: number): 'not-found' | 'forbidden' | 'unauthorized' | undefined;
|