Open leitzler opened 5 years ago
We return 500 here because we can't get error codes from the go
CLI that we use behind the scenes. I think we have two options to fix this:
@marwan-at-work did you already create the bug I referenced in (2) above? For some reason I remember that you did. If not, I'll create one, just let me know
I'd vote for (2)
I like 2 as well, if accepted it could be behind a flag so only special use cases such as ours.
In the meantime a few regex for error types might not be a bad idea.
I have a sample repo that outputs the following error when i run
go run main.go
:The error is due to incorrect import paths in my project, and can be fixed by updating them.
However when I do use athens as proxy, it returns
500 Internal server error
:As a user I might not have access to the athens logs where the details can be found. Since it is a error introduced by the user, that can be fixed by the user, I suggest that athens returns
4xx
instead, like422 Unprocessable entity
.