Change http error code when returning an alert