Amazon SNS に Python 2.7 と boto ライブラリを使用しています。例外の詳細を含む例外を取得したときに通知を送信しようとしています。場合によっては、例外文字列に " --->
" または " "のような文字列が含まれます\
。BotoServerError
これらの文字が不正なリクエストの原因であると思われます。
完全な例外文字列:
boto.exception.BotoServerError: BotoServerError: 400 Bad Request None
アプリケーションをこの例外から防ぐ最善の方法は何ですか?
編集:メッセージを送信するコードは次のとおりです。
sns = boto.sns.connect_to_region(credentials...)
sns.publish(topicArn, message, subject)
これはメッセージです:
Type: <type 'exceptions.ValueError'>
Detail: ('invalid literal for int() with base 10: \'{"default":"216","sqs":"216"}\'',)