v0.0.349
All checks were successful
Build Docker and Deploy / Run goext test-suite (push) Successful in 1m51s
All checks were successful
Build Docker and Deploy / Run goext test-suite (push) Successful in 1m51s
This commit is contained in:
13
exerr/gin.go
13
exerr/gin.go
@@ -57,6 +57,19 @@ func (ee *ExErr) toJson(depth int, applyExtendListener bool, outputMeta bool) la
|
||||
return ginJson
|
||||
}
|
||||
|
||||
func (ee *ExErr) ToDefaultAPIJson() (string, error) {
|
||||
|
||||
gjr := json.GoJsonRender{Data: ee.ToAPIJson(true, pkgconfig.ExtendedGinOutput, pkgconfig.IncludeMetaInGinOutput), NilSafeSlices: true, NilSafeMaps: true}
|
||||
|
||||
r, err := gjr.RenderString()
|
||||
|
||||
if err != nil {
|
||||
return "", err
|
||||
}
|
||||
|
||||
return r, nil
|
||||
}
|
||||
|
||||
// ToAPIJson converts the ExError to a json object
|
||||
// (the same object as used in the Output(gin) method)
|
||||
//
|
||||
|
Reference in New Issue
Block a user