Instead of always using 400, errors now set the error code something more meaningful when possible issue #5924