Fixes promises error handling in Amber