njs_promise_prototype_catch(njs_vm_t *vm, njs_value_t *args, njs_uint_t nargs,
    njs_index_t unused)
{
    njs_value_t  arguments[2];

    arguments[0] = njs_value_undefined;
    arguments[1] = *njs_arg(args, nargs, 1);

    return njs_promise_invoke_then(vm, njs_argument(args,  0), arguments, 2);
}
njs_promise_prototype_catch(njs_vm_t *vm, njs_value_t *args, njs_uint_t nargs,
    njs_index_t unused)
{
    njs_value_t  arguments[2];

    arguments[0] = njs_value_undefined;
    arguments[1] = *njs_arg(args, nargs, 1);

    return njs_promise_invoke_then(vm, njs_argument(args,  0), arguments, 2);
}