1
0
mirror of https://github.com/kataras/iris.git synced 2025-12-17 18:07:01 +00:00
This commit is contained in:
kataras
2022-06-20 15:31:17 +03:00
parent 9dc356c1d8
commit d1a1dacaff

View File

@@ -841,7 +841,7 @@ func (ctx *Context) StopWithPlainError(statusCode int, err error) {
// it will also fire the specified error code handler.
func (ctx *Context) StopWithJSON(statusCode int, jsonObject interface{}) error {
ctx.StopWithStatus(statusCode)
return ctx.writeJSON(jsonObject, nil) // do not modify - see errors.DefaultContextErrorHandler.
return ctx.writeJSON(jsonObject, &DefaultJSONOptions) // do not modify - see errors.DefaultContextErrorHandler.
}
// StopWithProblem stops the handlers chain, writes the status code