8000 do not use an internal error for JSON parse errors (#7799) · HighAvailabilityLab/arangodb@99809a4 · GitHub
[go: up one dir, main page]

Skip to content

Commit 99809a4

Browse files
authored
do not use an internal error for JSON parse errors (arangodb#7799)
1 parent 7f4740b commit 99809a4

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

arangod/GeneralServer/RestHandler.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -462,7 +462,8 @@ void RestHandler::executeEngine(bool isContinue) {
462462
<< DIAGNOSTIC_INFORMATION(ex);
463463
#endif
464464
RequestStatistics::SET_EXECUTE_ERROR(_statistics);
465-
bool const isParseError = (ex.errorCode() == arangodb::velocypack::Exception::ParseError);
465+
bool const isParseError = (ex.errorCode() == arangodb::velocypack::Exception::ParseError ||
466+
ex.errorCode() == arangodb::velocypack::Exception::UnexpectedControlCharacter);
466467
Exception err(isParseError ? TRI_ERROR_HTTP_CORRUPTED_JSON : TRI_ERROR_INTERNAL, std::string("VPack error: ") + ex.what(),
467468
__FILE__, __LINE__);
468469
handleError(err);

0 commit comments

Comments
 (0)
0