Now returns correct success code.
Now uses 400 error for RuntimeExceptions and 500 error for all other exceptions.