Previously, when dynamic proxy URL evaluation failed in
ngx_qjs_fetch(), the error was returned directly, bypassing the fail
path which deletes the registered fetch event and releases the
promise. The njs counterpart already goes through the fail path.
As a side effect, the error is now reported by rejecting the
returned promise instead of throwing synchronously, consistently
with the other failure paths.
!= NGX_OK)
{
JS_ThrowInternalError(cx, "failed to evaluate proxy URL");
- return JS_EXCEPTION;
+ goto fail;
}
} else {