mirror of https://gitee.com/bigwinds/arangodb
do not use an internal error for JSON parse errors (#7799)
This commit is contained in:
parent
7f4740b335
commit
99809a445e
|
@ -462,7 +462,8 @@ void RestHandler::executeEngine(bool isContinue) {
|
|||
<< DIAGNOSTIC_INFORMATION(ex);
|
||||
#endif
|
||||
RequestStatistics::SET_EXECUTE_ERROR(_statistics);
|
||||
bool const isParseError = (ex.errorCode() == arangodb::velocypack::Exception::ParseError);
|
||||
bool const isParseError = (ex.errorCode() == arangodb::velocypack::Exception::ParseError ||
|
||||
ex.errorCode() == arangodb::velocypack::Exception::UnexpectedControlCharacter);
|
||||
Exception err(isParseError ? TRI_ERROR_HTTP_CORRUPTED_JSON : TRI_ERROR_INTERNAL, std::string("VPack error: ") + ex.what(),
|
||||
__FILE__, __LINE__);
|
||||
handleError(err);
|
||||
|
|
Loading…
Reference in New Issue