Open
Description
In go errors
pkg can create a joinErr
by errors.Join()
, which can be Unwrap()
into []error
.
joinErr
also format it's print into \n
separated string, which is similar with gin.errorMsgs.String()
but can cause confuse, when they are used together:
Error #01 gin error
Error #02 service error
store error
Error #03 other error
In this case service error
& store error
is combined with a joinErr
.
I think it will be better if we can see:
Error #01 gin error
Error #02 service error
Error #03 store error
Error #04 other error
Even though we can unwrap joinErr
before we use gin.Error()
, it will be better if gin.Error()
do the unwrap for us as a internal logic.
Metadata
Metadata
Assignees
Labels
No labels