bugfix unhandled ex in case of duplicateexception (#862)
Co-authored-by: Florian Mader <florian.mader@outlook.com>
This commit is contained in:
1 parent
2f07effa18
commit
be413887a1
1 file changed
+3
-1
@@ -41,7 +41,8 @@ public class ExceptionMiddleware
|
|||||||
Message = duplicationException.Message
|
Message = duplicationException.Message
|
||||||
}.ToString());
|
}.ToString());
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
context.Response.StatusCode = (int)HttpStatusCode.InternalServerError;
|
context.Response.StatusCode = (int)HttpStatusCode.InternalServerError;
|
||||||
await context.Response.WriteAsync(new ErrorDetails()
|
await context.Response.WriteAsync(new ErrorDetails()
|
||||||
{
|
{
|
||||||
@@ -50,3 +51,4 @@ public class ExceptionMiddleware
|
|||||||
}.ToString());
|
}.ToString());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
Reference in new issue
Block a user