Skip to content
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

Merged
merged 6 commits into from
Oct 24, 2018
Merged

Conversation

gernest
Copy link
Contributor

@gernest gernest commented Oct 22, 2018

  • T14
  • T15

Copy link
Member

@paddybyers paddybyers left a 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.

if e.StatusCode != 0 {
fmt.Fprintf(&buf, ": statusCode=%d", e.StatusCode)
}
if e.Code != 0 {
Copy link
Member

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`.

Copy link
Member

@paddybyers paddybyers left a 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

@gernest gernest merged commit 2aba37a into ably:integration-spec-1.1 Oct 24, 2018
@gernest gernest deleted the href branch October 24, 2018 07:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants