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

Make HttpPaginatedResponse json-stringifiable #860

Closed
SimonWoolf opened this issue Nov 18, 2021 · 1 comment · Fixed by #913
Closed

Make HttpPaginatedResponse json-stringifiable #860

SimonWoolf opened this issue Nov 18, 2021 · 1 comment · Fixed by #913
Labels
enhancement New feature or improved functionality.

Comments

@SimonWoolf
Copy link
Member

SimonWoolf commented Nov 18, 2021

Currently if someone tries to json-stringify an HttpPaginatedResponse, they'll get a rather unfriendly "TypeError: Converting circular structure to JSON" error (because an HPR subclasses PaginatedResult and so contains the resource). We should implement toJSON that returns just the fields that should be there, per https://ably.com/documentation/rest/types#http-paginated-response , although why are those docs missing errorMessage and errorCode aargh

┆Issue is synchronized with this Jira Story by Unito

@SimonWoolf SimonWoolf added the enhancement New feature or improved functionality. label Nov 18, 2021
@SimonWoolf
Copy link
Member Author

also see ably/specification#103

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or improved functionality.
Development

Successfully merging a pull request may close this issue.

1 participant