API errors now generate HTTP 400 responses.