Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
# return None instead of throw an exception
# in case of location service failure
# SDK still has to work for robustness
return None
else:
raise exs.ClientException(
result.get('Code'), result.get('Message'))
except IOError:
# return None instead of throw an exception
# in case of location service unreachable,
# SDK still has to work for robustness
return None
except AttributeError:
raise exs.ClientException(
error_code.SDK_INVALID_REQUEST,
error_msg.get_msg('SDK_INVALID_REQUEST'))