-
Notifications
You must be signed in to change notification settings - Fork 57
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: waku_filter_v2/common: PEER_DIAL_FAILURE ret code change: 200 -> 504 #2236
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks!
You can find the image built from this PR at
Built from 350e384 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM and this should definitely be an error code.
Note however that it was chosen to correspond with what is already implemented for Store:
nwaku/waku/waku_store/common.nim
Line 66 in 59ee3c6
PEER_DIAL_FAILURE = uint32(200) |
Less important, but something to consider:
504 is also the HTTP error code for Gateway Timeout, which is very similar/equivalent to peer dial failure. Should we consider sticking to HTTP terminology? All other error codes are chosen to mirror the HTTP codes
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Much better thanks!
@@ -13,11 +13,11 @@ const | |||
type | |||
FilterSubscribeErrorKind* {.pure.} = enum | |||
UNKNOWN = uint32(000) | |||
PEER_DIAL_FAILURE = uint32(200) # TODO shouldn't this be an error code, e.g. 504 Gateway Timeout? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are a couples of TODOs in the code base and I always think to myself. Why not just change it instead of adding a TODO your touching this part of the code anyway. If you need to remember to do something later should open an issue IMO.
Thanks for the heads-up! |
Changing the return code to a more meaningful value when
PEER_DIAL_FAILURE
happens.