Skip to content

Severity.fromString was removed in @sentry/types@6.17.0 #4903

Description

@billyjanitsch

Is there an existing issue for this?

How do you use Sentry?

Self-hosted/on-premise

Which package are you using?

@sentry/browser

SDK Version

6.19.6

Framework Version

6.19.6

Link to Sentry event

No response

Steps to Reproduce

  1. Install @sentry/types@6.16.0.
  2. Run the following code:
    import {Severity} from '@sentry/types'
    console.log(Severity.fromString('warn'))
  3. Install @sentry/types@6.17.0.
  4. Run the same code.

Expected Result

On both versions, the console should print warning.

Actual Result

The Severity.fromString API was removed in 6.17.0, so the code crashes in that version and onwards.

I understand that you plan to remove the Severity enum entirely in v7 (a major release), but removing Severity.fromString in the meantime is a breaking change to a public API in a minor release.

There was discussion about this in #4280 (comment) where the consensus was to make this into an internal API, but it seems like that should have waited until v7, since in v6 the API is public. Could this API please be restored until then? Thanks!

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions