Try decoding string to UTF-8 on error message fail
Database Errors from SQLAlchemy tend to get mangled into ASCII. If an
error is process that contains UTF-8 data in ASCII form if fails to
build the message and will lead to a 5xx error. Catch the error and try
to decode it to create the message again, if that doesn't work at least
fail gracefully.
Closes-Bug: 1253905
Change-Id: Iecb1170387c51064918780dc6de07db7ca8aeeee
(cherry picked from commit dcefe5874de3073551226c0bdd1e70f00d6a91a1)
Reviewed: https:/ /review. openstack. org/62264 /git.openstack. org/cgit/ openstack/ keystone/ commit/ ?id=e7d6a7f94fa ae205459ab41b50 fcd457b6ca7345
Committed: https:/
Submitter: Jenkins
Branch: stable/havana
commit e7d6a7f94faae20 5459ab41b50fcd4 57b6ca7345
Author: Jamie Lennox <email address hidden>
Date: Fri Nov 22 16:52:42 2013 +1000
Try decoding string to UTF-8 on error message fail
Database Errors from SQLAlchemy tend to get mangled into ASCII. If an
error is process that contains UTF-8 data in ASCII form if fails to
build the message and will lead to a 5xx error. Catch the error and try
to decode it to create the message again, if that doesn't work at least
fail gracefully.
Closes-Bug: 1253905 64918780dc6de07 db7ca8aeeee 551226c0bdd1e70 f00d6a91a1)
Change-Id: Iecb1170387c510
(cherry picked from commit dcefe5874de3073