Replaced "BAD_GATEWAY" with "BAD_REQUEST".

I have done this several times now. We may need to investigate how this keeps getting reverted.