For promise, make sure error_code is negative