Wrap error msg (but not prompt) in a 500 response

Addresses #131. Needs a proper test on devapi, but I think it's pretty safe.