Reject a promise instead of throwing an error

See #5 for more details