-
Notifications
You must be signed in to change notification settings - Fork 2
Closed
Labels
enhancementNew feature or requestNew feature or request
Description
Hi,
Perhaps this is not desired, but its worth a issue creation.
I want to see an more general error in the console when i'm using the mock lib on a path not configured and enableFallback: false
Now an JSON parse exception is thrown, because of the undefined response
utils.js:93 SyntaxError: Unexpected token o in JSON at position 1
at JSON.parse (<anonymous>)
at Object.fetchmockMiddleware [as middleware] (utils.js:17)
at yet-another-fetch-mock.es5.js:955 "SyntaxError: Unexpected token o in JSON at position 1
at JSON.parse (<anonymous>)
at Object.fetchmockMiddleware [as middleware] (http://localhost:3000/aktivitetsplanfelles/bundle.js:27012:34)
at http://localhost:3000/aktivitetsplanfelles/bundle.js:168050:40"
(anonymous) @ utils.js:93
Promise.catch (async)
(anonymous) @ utils.js:161
(anonymous) @ index.js:11
dispatch @ VM75:1
hentEnheter @ opprett-oppgave-form.js:166
onChange @ opprett-oppgave-form.js:80
onChange @ select.js:24
executeOnChange @ LinkedValueUtils.js:132
_handleChange @ ReactDOMSelect.js:190
ReactErrorUtils.invokeGuardedCallback @ ReactErrorUtils.js:69
executeDispatch @ EventPluginUtils.js:85
executeDispatchesInOrder @ EventPluginUtils.js:108
executeDispatchesAndRelease @ EventPluginHub.js:43
executeDispatchesAndReleaseTopLevel @ EventPluginHub.js:54
forEachAccumulated @ forEachAccumulated.js:24
processEventQueue @ EventPluginHub.js:257
runEventQueueInBatch @ ReactEventEmitterMixin.js:17
handleTopLevel @ ReactEventEmitterMixin.js:28
handleTopLevelImpl @ ReactEventListener.js:72
perform @ Transaction.js:140
batchedUpdates @ ReactDefaultBatchingStrategy.js:62
batchedUpdates @ ReactUpdates.js:97
dispatchEvent @ ReactEventListener.js:147 ```
Quist
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request