Closed lucasmerlin closed 1 year ago
I'm getting similar errors while using 2.0 version storyblok-react which uses this library under the hood. I'll need to downgrade to v1 until this is fixed since currently all 404 pages result in 500
Hi @lucasmerlin @kb1995, we introduced some fixes in the latest versions of the SDK. Can you update the SDK version and check if the error is still happening to you?
Seems like this has been working fine for us with recent versions, so I think this issue can be closed
With @storyblok/js 2.0.10-2.0.12, trying to load a story with a slug that doesn't exist, storyblok client causes a UnhandledPromiseRejection.
Expected Behavior
A error with statusCode 404 should be thrown.
Current Behavior
NodeJS crashes with a UnhandledPromiseRejection:
Steps to Reproduce
Minimal reproduction (call with
node main.mjs
):Tried this with node 18.12.1 and 19.5.0.
Workaround
Installing @storyblok/js v2.0.9 fixes this