Skip to content

Commit d84aa7e

Browse files
Jay Edgarmeta-codesync[bot]
authored andcommitted
Add SQ_INTERNAL_ERROR for reporting internal client errors
Summary: When the client detects an internal invariant violation -- a state it believes is unreachable -- it currently aborts the process with a CHECK. That takes down everything running in the process because of a client-side bug that affects a single operation. Add SQ_INTERNAL_ERROR to the SquangleErrno enum so those sites can instead fail the operation and report an error to the caller. This commit only introduces the value; converting the individual CHECK sites to use it is separate. The addition is purely additive -- no existing enumerator is renumbered. Reviewed By: aditya-jalan Differential Revision: D116688926 fbshipit-source-id: 233270d720b589c01e25e66576484221305a6d63
1 parent de0b807 commit d84aa7e

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

  • third-party/squangle/src/squangle/mysql_client

third-party/squangle/src/squangle/mysql_client/Operation.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,7 @@ enum class SquangleErrno : uint16_t {
107107
SQ_ERRNO_FAILED_CONFIG_INIT = 7005,
108108
SQ_INVALID_API_USAGE = 7006,
109109
SQ_INITIALIZATION_FAILED = 7007,
110+
SQ_INTERNAL_ERROR = 7008,
110111
};
111112

112113
// prefix to use in mysql errors generated by the client

0 commit comments

Comments
 (0)