Skip to content

Commit 96898bf

Browse files
taidaiimeta-codesync[bot]
authored andcommitted
errors: introduce NETWORK_ERROR into thrift error types
Summary: Introduce NETWORK_ERROR as a new error type into EdenFS. The errorCode field will be used as network error code. # Context As a FUSE system that fetches trees & blobs remotely, it makes sense for Eden to have network error as an error category. It's also helpful for users to know the errors are from the networking layer rather than other layers. In fact network errors account for the majority of Eden errors that buck2 sees as of today. NOTE: Since network errors may be from various networking libraries (e.g., libcurl, http), there is chance of code collisions from different libraries. This is not a current problem, but we can utilize higher bits of the error code to identify library should this become an issue. Reviewed By: kavehahmadi60 Differential Revision: D85065711 fbshipit-source-id: 9bd073593e3c4bba4e87ca5997afed90bb139406
1 parent 7d119b6 commit 96898bf

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

third-party/watchman/src/eden/fs/service/eden.thrift

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,13 @@ enum EdenErrorType {
150150
* contain specific details about the cancellation failure.
151151
*/
152152
CANCELLATION_ERROR = 10,
153+
/**
154+
* The errorCode property is a network error code.
155+
*
156+
* If there should be a code collision with different networking libraries,
157+
* the higher bits of the error code can be utilized to disambiguate.
158+
*/
159+
NETWORK_ERROR = 11,
153160
}
154161

155162
exception EdenError {

0 commit comments

Comments
 (0)