Skip to content

Error: cannot get (fulfillment value or rejection reason) of a non (fulfilled or rejected) promise

benjamingr edited this page Feb 6, 2014 · 1 revision

Error: cannot get fulfillment value/rejection reason of a non-(fulfilled/rejected) promise

You can get this error when you're trying to call .value or .error when inspecting a promise where the promise has not been fulfilled or rejected yet.

For example:

var p = Promise.delay(1000);
p.inspect().value();

Consider using .isPending() .isFulfilled and .isRejected in order to inspect the promise for status.

Please consider reading more about synchronous inspection in the API page