Skip to content
This repository was archived by the owner on Nov 28, 2022. It is now read-only.

If we fail to render JSON, fallback to string rendering.#258

Merged
erunion merged 1 commit intomasterfrom
bug/json-rendering-fallbacks
Aug 7, 2019
Merged

If we fail to render JSON, fallback to string rendering.#258
erunion merged 1 commit intomasterfrom
bug/json-rendering-fallbacks

Conversation

@erunion
Copy link
Copy Markdown
Member

@erunion erunion commented Aug 6, 2019

🎟 Asana

This adds in some protections on our JSON rendering in response examples to prevent us from failing out on "Unexpected token" errors if we're attempt to render a string as JSON that isn't actually JSON. This kind of thing can happen if a response is documented as returning JSON, but instead has a simple string documented as an example.

@erunion erunion added the type:bug Something isn't working label Aug 6, 2019
Copy link
Copy Markdown
Member

@domharrington domharrington left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested locally and LGTM!

@erunion erunion merged commit 0d4dcd5 into master Aug 7, 2019
@erunion erunion deleted the bug/json-rendering-fallbacks branch August 7, 2019 16:45
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

type:bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants