All Downloads are FREE. Search and download functionalities are using the official Maven repository.

package.build.cjs.breadcrumb-log-level.js.map Maven / Gradle / Ivy

There is a newer version: 8.38.0
Show newest version
{"version":3,"file":"breadcrumb-log-level.js","sources":["../../src/breadcrumb-log-level.ts"],"sourcesContent":["import type { SeverityLevel } from '@sentry/types';\n\n/**\n * Determine a breadcrumb's log level (only `warning` or `error`) based on an HTTP status code.\n */\nexport function getBreadcrumbLogLevelFromHttpStatusCode(statusCode: number | undefined): SeverityLevel | undefined {\n  // NOTE: undefined defaults to 'info' in Sentry\n  if (statusCode === undefined) {\n    return undefined;\n  } else if (statusCode >= 400 && statusCode < 500) {\n    return 'warning';\n  } else if (statusCode >= 500) {\n    return 'error';\n  } else {\n    return undefined;\n  }\n}\n"],"names":[],"mappings":";;AAEA;AACA;AACA;AACO,SAAS,uCAAuC,CAAC,UAAU,EAAiD;AACnH;AACA,EAAE,IAAI,UAAW,KAAI,SAAS,EAAE;AAChC,IAAI,OAAO,SAAS,CAAA;AACpB,GAAE,MAAO,IAAI,UAAA,IAAc,GAAA,IAAO,UAAA,GAAa,GAAG,EAAE;AACpD,IAAI,OAAO,SAAS,CAAA;AACpB,SAAS,IAAI,UAAW,IAAG,GAAG,EAAE;AAChC,IAAI,OAAO,OAAO,CAAA;AAClB,SAAS;AACT,IAAI,OAAO,SAAS,CAAA;AACpB,GAAE;AACF;;;;"}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy