mirror of
https://github.com/kataras/iris.git
synced 2025-12-20 11:27:06 +00:00
minor
Former-commit-id: e83456ced3d00d6da3001d083e22a0568748298e
This commit is contained in:
@@ -114,7 +114,7 @@ func (t *Transaction) Complete(err error) {
|
||||
reason = errWstatus.Reason
|
||||
}
|
||||
// get the content type used on this transaction
|
||||
if cTypeH := t.context.ResponseWriter().Header().Get(ContentTypeHeaderKey); cTypeH != "" {
|
||||
if cTypeH := t.context.GetContentType(); cTypeH != "" {
|
||||
cType = cTypeH
|
||||
}
|
||||
|
||||
@@ -168,8 +168,7 @@ var RequestTransactionScope = TransactionScopeFunc(func(maybeErr TransactionErrR
|
||||
ctx.ContentType(maybeErr.ContentType)
|
||||
} else {
|
||||
// else execute the registered user error and skip the next transactions and all normal flow,
|
||||
ctx.StatusCode(maybeErr.StatusCode)
|
||||
ctx.StopExecution()
|
||||
ctx.StopWithStatus(maybeErr.StatusCode)
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user