summaryrefslogtreecommitdiffstats
path: root/nova/utils.py
diff options
context:
space:
mode:
authorAnthony Young <sleepsonthefloor@gmail.com>2011-03-18 05:11:06 +0000
committerTarmac <>2011-03-18 05:11:06 +0000
commitabe147f756f13d4f968aa075d709e5c6643d310a (patch)
tree2daf7096550708b60ed0ad8efebe8ff5c3a9c340 /nova/utils.py
parente27dc1168c8061c43b3cc64cc10e8a31a37ba39e (diff)
parente2d66aaa670817bda9bf1b494b6a4cfde32b6daf (diff)
downloadnova-abe147f756f13d4f968aa075d709e5c6643d310a.tar.gz
nova-abe147f756f13d4f968aa075d709e5c6643d310a.tar.xz
nova-abe147f756f13d4f968aa075d709e5c6643d310a.zip
Make "ApiError" the default error code for ApiError instances, rather than "Unknown."
Note Dashoard's error handling code: except boto.exception.BotoServerError, e: if e.status == 400 and e.error_code == 'ApiError': raise NovaApiError(e) elif e.status == 401: raise NovaUnauthorizedError() elif e.status == 503: raise NovaUnavailableError(e) raise NovaServerError(e) So an error_code of 'Unknown' will raise an ugly exception. This change also makes the euca errors a bit prettier: > euca-attach-volume -i i-1 vol-2 -d /dev/vdb > ApiError: ApiError: Volume status must be available Rather than: > euca-attach-volume -i i-1 vol-2 -d /dev/vdb > Unknown: Unknown: Volume status must be available Though the reiteration of the error code is still a bit ugly.
Diffstat (limited to 'nova/utils.py')
0 files changed, 0 insertions, 0 deletions