Closed mreishus closed 2 years ago
Some comparisons with #102 are handling of the inputs we don't currently recognize. Notably while we don't crash the app in this PR we still print out garbage to the <LookupContainer>
and mess up the parameter inputs, in some cases showing the entire endpoint path/URL as if it's a single parameter, but one which doesn't allow entry.
This PR
#102
Closing because #102 merged, which should replace this PR.
Summary
These lines can cause a fatal crash:
https://github.com/Automattic/wp-api-console/blob/014eb1c28c57cb8ca11ed9516f3c17df1a10706d/src/api/core.js#L142-L143
It has something to do with invalid data coming from the backend. It's currently happening with WP.com wpcom/v2 endpoints. Change: Make the code more resilient and ignore the paths that do not match the regex.
To test
http://localhost:3000