go-gin-api icon indicating copy to clipboard operation
go-gin-api copied to clipboard

API报错自定义errorMessage不呈现

Open upeng opened this issue 3 years ago • 0 comments

https://github.com/xinliangnote/go-gin-api/blob/4530dab87b1b412f65af1bc9f853ebb6b57e9aaa/internal/pkg/core/error.go#L73

image

API报错内容不够具体,只会报错code对应的error,自定义的error message不会暴露出来;可以加上e.stackError.Error()

upeng avatar Apr 17 '23 13:04 upeng