Next.js website for Rocky Mountain Vending company featuring: - Product catalog with Stripe integration - Service areas and parts pages - Admin dashboard with Clerk authentication - SEO optimized pages with JSON-LD structured data Co-authored-by: Cursor <cursoragent@cursor.com>
18 lines
544 B
Text
18 lines
544 B
Text
/**
|
|
* Determine a breadcrumb's log level (only `warning` or `error`) based on an HTTP status code.
|
|
*/
|
|
function getBreadcrumbLogLevelFromHttpStatusCode(statusCode) {
|
|
// NOTE: undefined defaults to 'info' in Sentry
|
|
if (statusCode === undefined) {
|
|
return undefined;
|
|
} else if (statusCode >= 400 && statusCode < 500) {
|
|
return 'warning';
|
|
} else if (statusCode >= 500) {
|
|
return 'error';
|
|
} else {
|
|
return undefined;
|
|
}
|
|
}
|
|
|
|
export { getBreadcrumbLogLevelFromHttpStatusCode };
|
|
//# sourceMappingURL=breadcrumb-log-level.js.map
|