Fixed a bug where some errors that were being thrown as 400's should have been 500's