🐛 fixed error messages for filters

This commit is contained in:
EntireTwix 2021-07-06 22:00:43 -07:00
parent dedff14e7e
commit 2681ca86c2
2 changed files with 3 additions and 3 deletions

View file

@ -19,7 +19,7 @@ void JsonFilter<check_content_type>::doFilter(const HttpRequestPtr &req,
fccb(); fccb();
return; return;
} }
const auto &resp = HttpResponse::newCustomHttpResponse(BankResponse(k406NotAcceptable, "Client must Accept and have content-type of JSON")); const auto &resp = HttpResponse::newCustomHttpResponse(BankResponse(k406NotAcceptable, "\"Client must Accept and have content-type of JSON\""));
fcb(resp); fcb(resp);
} }
else else
@ -29,7 +29,7 @@ void JsonFilter<check_content_type>::doFilter(const HttpRequestPtr &req,
fccb(); fccb();
return; return;
} }
const auto &resp = HttpResponse::newCustomHttpResponse(BankResponse(k406NotAcceptable, "Client must Accept JSON")); const auto &resp = HttpResponse::newCustomHttpResponse(BankResponse(k406NotAcceptable, "\"Client must Accept JSON\""));
fcb(resp); fcb(resp);
} }
} }

View file

@ -52,7 +52,7 @@ void UserFilter<set_body_flag, require_admin>::doFilter(const HttpRequestPtr &re
} }
} }
} }
const auto &resp = HttpResponse::newCustomHttpResponse(BankResponse(k401Unauthorized, "Invalid Credentials")); const auto &resp = HttpResponse::newCustomHttpResponse(BankResponse(k401Unauthorized, "\"Invalid Credentials\""));
fcb(resp); fcb(resp);
} }