mirror of
https://gitee.com/zyjblog/oatpp.git
synced 2024-12-22 22:16:37 +08:00
fix the bug of send "null" in request body causes seg-fault on any endpoint w/ BODY_DTO
This commit is contained in:
parent
57e6a714d7
commit
df9ddc0313
@ -126,7 +126,7 @@ public:
|
||||
auto type = Wrapper::Class::getType();
|
||||
oatpp::parser::Caret caret(str);
|
||||
auto result = read(caret, type).template cast<Wrapper>();
|
||||
if(result == nullptr) {
|
||||
if(caret.hasError()) {
|
||||
throw oatpp::parser::ParsingError(caret.getErrorMessage(), caret.getErrorCode(), caret.getPosition());
|
||||
}
|
||||
return result;
|
||||
|
Loading…
Reference in New Issue
Block a user