This repository has been archived by the owner on Nov 28, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 23
feat: improved error messaging functionality #517
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
erunion
added
the
type:enhancement
A potential new feature to be added, or an improvement we could make
label
Mar 11, 2020
@rafegoldberg For the consumer view, I talked with @amyshi188 and it might be best if the error message extends the full width of the box since there's no error code. |
…pi-explorer into feat/improved-error-messaging
13 tasks
erunion
added a commit
that referenced
this pull request
Mar 13, 2020
#436) * feat: moving react-jsonschema-form off our fork and to the mainline pkg * docs: wip updates to the allOf example definition * chore(deps): pointing rjsf towards our new soft fork * test: updating our allOf example document * feat: adding support for `format: blob` to render a string textarea * feat: adding support for rendering a textarea on `format: html` * fix: html and blob formats now have the right format pill next to them * chore: re-running npm install to fix some dep merge issues * chore(deps): upgrading @readme/react-jsonschema-form to 1.1.0 * test: cleanup on the github workflow * test: workflow updates * test: reverting workflow changes * docs: merging our three polymorphism example docs into a single file * fix: fixing a bug where long flattened response bodies would be hidden * docs: adding a comment in the SchemaField explaining bool handling * fix: updating word wrapping on response schemas * chore: minor cleanup of the root package file * chore: updating package-lock files * test: moving test fixtures into a __fixtures__ directory * test: resolving some broken Doc tests * docs: removing some duplicated properties from the oas fixture * test: fixing some broken custom string format tests * fix: adding support for being able to handle escaped refs * test: dumping jest-transform-css for another library to fix css issues in jest tests * test: fixing some broken tests * test: making sure to run `npm run update:examples` before tests * chore(deps): upgrading @readme/oas-tooling to 3.0.0 * test: fixing a comment * fix: removing some hokey environment checks for scss loading * fix: wrapping oneOf and anyOf schemas in a custom template shell * test: fixing a busted Doc test * fix: if an operation doesn't have an operationId, generate a unique one * docs: adding a cyclical refs example document * fix: patching a bug where we couldn't handle nested $refs in oneOf resolves https://github.com/readmeio/api-explorer/issues/495 * chore(deps): upgrading @readme/react-jsonschema-form to 1.1.1 * feat: improved error messaging functionality (#517) * feat: wip of improved error messaging functionality * style(EndpointErrorBoundary) * feat: adding a checkbox to toggle error masking in the demo build * test: fixing broken tests * feat: consolidating our multiple error boundary components into one Co-authored-by: Rafe Goldberg <rafegoldberg@gmail.com> * docs: updating the readme * style: autoprefix scss ...just in case * chore: updating lock files post-bootstrap * fix: cleaning up the new "experiment" options in the demo build * feat: adding a new experiment toggle for the new markdown engine * fix: adding back a form id that i renamed/fixed * fix: stop generating random ids when an operationId isn't present * fix: renaming `onGroupChange` to `onAuthGroupChange` Co-authored-by: Rafe Goldberg <rafegoldberg@gmail.com>
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
🌱 Changes
maskErrorMessages
flag on theDoc
component that will let us toggle error messages between a consumer-friendly version, and one more targeted to ReadMe project owners.onError
handler toDoc
that will get run whenever an error happens within the Explorer. We can use this to hook it up Explorer error reporting to Sentry! CurrentlyonError
is expected to return an event identifier (like the README-G ids we have in Sentry) which it'll then use to display that as an error code in the frontend for project owners if they wish to contact us.🎨 Designs
Designs can be found in Figma under "Amy 20% Project".
⚙ Testing
You can test the error state out on http://localhost:9966/?selected=swagger-files%2Fendpoint-error-boundary.json
To cycle through the different masked states click on the "Mask error message" checkbox:
To trigger the complete explorer failure state, click "Show fully broken state":