-
Notifications
You must be signed in to change notification settings - Fork 31
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
add href attribute to ErrorInfo #103
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.
See comment. Sorry, but we need to expand the spec in this area.
ably/proto/error.go
Outdated
if e.StatusCode != 0 { | ||
fmt.Fprintf(&buf, ": statusCode=%d", e.StatusCode) | ||
} | ||
if e.Code != 0 { |
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.
The spec is awaiting some expanded/clarified requirements for this. In the meantime please look at ably/ably-ruby@ea425be for what needs to be implemented and tested.
When you receive an ErrorInfo err
, you determine the error message to display as follows:
if `err` contains a non-empty `href` then `error_href = err.href`
else if `err` contains a non-empty `code` then `error_href` = `"https://help.ably.io/error/#{err.code}"`
if `err_href` is defined, and `err.message` does not contain `err_href`, then append `" -> see #{error_href} for help"` to `err.message`.
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.
Just one comment but otherwise LGTM, thanks
T14
T15