Minor issue: I don't see the point of appending this to the error message, since we log this information on the line above. I'd just call `raise` here.