sentry-cli icon indicating copy to clipboard operation
sentry-cli copied to clipboard

Idea: Centrally define all endpoint URLs we can access

Open szokeasaurusrex opened this issue 2 months ago • 1 comments

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.

szokeasaurusrex avatar Oct 10 '25 10:10 szokeasaurusrex

CLI-185

linear[bot] avatar Oct 10 '25 10:10 linear[bot]