redoc icon indicating copy to clipboard operation
redoc copied to clipboard

Error callback not called if specs are not found

Open meden opened this issue 3 years ago • 1 comments

Describe the bug Error callback not called if specs are not found.

Expected behavior The error callback being called even in this case, so to be able to recover.

Minimal reproducible OpenAPI snippet(if possible) N/A

Screenshots image

Additional context I faced this problem by using a minimal Redoc HTML file, initializing Redoc manually. If the spec URL is wrong, I get a stack trace, and the component dies.

I'd like to be able to re-init the component with the right URL (I'm using a select to switch specs).

I think the issue is because of an uncaught error in a promise, preventing (or better said, not triggring) the callback execution.

image

Maybe this is related to #1686, or #690 (similar behavior, but different cause).

meden avatar May 27 '22 09:05 meden

@meden @meden Hi! thanks for bug reporting. We'll fix that.

AlexVarchuk avatar May 27 '22 15:05 AlexVarchuk