Question about in-line custom error types. #3806
Answered
by
raphael
RedMarcher
asked this question in
Q&A
|
I was wondering if an in-line error type declaration like this was workable? Goa gen runs successfully, but the resultant code seems to have errors in the gRPC section. |
Answered by
raphael
Sep 21, 2025
Replies: 2 comments
|
As a follow-up question, why do the autogenerated makeError functions take in an error as an argument? |
0 replies
|
I don't think this pattern is being used but it should be possible to support it. In any case the current behavior of generating incorrect code is clearly a bug, it should either generate workable code or error at generation time. The generated |
0 replies
Answer selected by
RedMarcher
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I don't think this pattern is being used but it should be possible to support it. In any case the current behavior of generating incorrect code is clearly a bug, it should either generate workable code or error at generation time.
The generated
MakeXYZErrorfunction use the error message to create the underlying Goa error data structure. The idea is that when you want to return an error you probably already have one you just want to wrap with the generated function.