Changed 'return HTTP...(detail=...)' to 'raise HTTP...(body=...)'
return -> raise will force the transaction manager to abort instead of committing when we want to exit a view with an exception response (https://docs.pylonsproject.org/projects/pyramid-tm/en/latest/#transaction-usage).
detail -> body will eliminate the boilerplate HTML that Pyramid uses for exception responses, meaning that the frontend can more easily display just the message we're sending.
Edited by Sam Kagan