8000 Feat: Error handling on the Backend to report human errors · Issue #1983 · coder/coder · GitHub
[go: up one dir, main page]

Skip to content
Feat: Error handling on the Backend to report human errors #1983
Closed
@Emyrk

Description

@Emyrk

What is your suggestion?

Ensure backend errors returned to the UI are human readable. Currently we elevate err.Error() a lot, which is not a good UI experience.

httpapi.Write(rw, http.StatusForbidden, httpapi.Response{
     Message: "Human message here",
     Internal: err.Error(),
})

Why do you want this feature?

So the backend can send appropriate errors over to the frontend.

This was a consequence of 2 cases (suspended user login and ...?...) where the backend error had more details than the FE.

Are there any workarounds to get this functionality today?

No

Are you interested in submitting a PR for this?

Yes

Metadata

Metadata

Assignees

Labels

apiArea: HTTP API

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

    0