def METHOD_NAME(message):
    def decorator(f):
        def wrapper(*args, **kwargs):
            try:
                return f(*args, **kwargs)
            except BundleAuthException:
                raise
            except RestClientException as e:
                raise BundleServiceException(message + ': ' + str(e), e.client_error)
            except urllib.error.HTTPError as e:
                try:
                    # Ensure the type of urllib.error.HTTPError response to be string
                    client_error = ensure_str(e.read())
                    if e.reason == 'invalid_grant':
                        raise BundleAuthException(
                            message + ': ' + http.client.responses[e.code] + ' - ' + client_error,
                            True,
                        )
                    else:
                        raise BundleServiceException(
                            message + ': ' + http.client.responses[e.code] + ' - ' + client_error,
                            400 <= e.code < 500,
                        )
                except json.decoder.JSONDecodeError as e:
                    raise BundleServiceException(message + ': ' + str(e), False)
            except (urllib.error.URLError, http.client.HTTPException, socket.error) as e:
                raise BundleServiceException(message + ': ' + str(e), False)
        return wrapper
    return decorator