1
0
mirror of https://github.com/bitwarden/server.git synced 2025-04-06 13:38:13 -05:00

Return not support extension messages

This commit is contained in:
Kyle Spearrin 2018-09-17 12:53:52 -04:00
parent b3b0bfa221
commit 86aa342bad

View File

@ -49,6 +49,11 @@ namespace Bit.Api.Utilities
errorModel.Message = exception.Message;
context.HttpContext.Response.StatusCode = 400;
}
else if(exception is NotSupportedException && !string.IsNullOrWhiteSpace(exception.Message))
{
errorModel.Message = exception.Message;
context.HttpContext.Response.StatusCode = 400;
}
else if(exception is ApplicationException)
{
context.HttpContext.Response.StatusCode = 402;