Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Consider exposing connectCodeToHTTP #781

Open
emarx opened this issue Sep 27, 2024 · 0 comments
Open

Consider exposing connectCodeToHTTP #781

emarx opened this issue Sep 27, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@emarx
Copy link

emarx commented Sep 27, 2024

Is your feature request related to a problem? Please describe.
I have some code that uses connect.Error, but need to serve HTTP text responses to serve a Prometheus-compatible endpoint. I'd love to use the same auth code that my connect endpoints use for my HTTP endpoint, but I need to map the status codes.

Describe the solution you'd like
There's a helpful function connectCodeToHTTP, but it's private. Could we expose this function?

Describe alternatives you've considered
Copy-paste this function, or build some other error class, but would love to use this one

@emarx emarx added the enhancement New feature or request label Sep 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant