Skip to content

Idea: Centrally define all endpoint URLs we can access #2839

@szokeasaurusrex

Description

@szokeasaurusrex

Currently, the URLs for API endpoints which the Sentry CLI accesses can be defined anywhere in the codebase as raw strings. This makes it difficult for us to keep a clear list of all API endpoints we access. Also, if we want to stop using a particular endpoint, perhaps because it will be removed from the backend, we have to search the entire codebase for possible occurrences of where we could be calling it.

Instead, we could define an enum (or some other data type) with all of the endpoints; then, any methods which take an endpoint URL would instead take that enum type, so the type system guarantees that the enumerated URLs are the only URLs which the CLI will attempt to access.

Metadata

Metadata

Assignees

No one assigned

    Labels

    CLIProduct area

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions