I am using Python 2.7 and boto library for Amazon SNS. I am trying to send a notification when I get an exception with detail of the exception. In some cases exception string contains strings like this "--->
" or " \
". I suspect these characters causing BotoServerError
as a Bad Request.
Full exception string:
boto.exception.BotoServerError: BotoServerError: 400 Bad Request None
What is the best way of preventing my application from this exception?
Edit: Here is the code that I am sending message:
sns = boto.sns.connect_to_region(credentials...)
sns.publish(topicArn, message, subject)
This is message:
Type: <type 'exceptions.ValueError'>
Detail: ('invalid literal for int() with base 10: \'{"default":"216","sqs":"216"}\'',)