Properly return a gateway error