MCPcopy Create free account
hub / github.com/agenticsorg/edge-agents / ResourceNotFoundError

Class ResourceNotFoundError

scripts/agents/devops/src/aws/base.py:41–61  ·  view source on GitHub ↗

Exception raised when a requested resource is not found.

Source from the content-addressed store, hash-verified

39
40
41class ResourceNotFoundError(AWSServiceError):
42 """Exception raised when a requested resource is not found."""
43
44 def __init__(self, message: str, resource_type: Optional[str] = None, resource_id: Optional[str] = None):
45 """
46 Initialize the resource not found error.
47
48 Args:
49 message: Error message
50 resource_type: Type of resource that was not found
51 resource_id: ID of the resource that was not found
52 """
53 suggestion = None
54 if resource_type and resource_id:
55 suggestion = f"Check if the {resource_type} '{resource_id}' exists and you have permission to access it."
56 elif resource_type:
57 suggestion = f"Check if the {resource_type} exists and you have permission to access it."
58
59 super().__init__(message, suggestion)
60 self.resource_type = resource_type
61 self.resource_id = resource_id
62
63
64class PermissionDeniedError(AWSServiceError):

Callers 5

handle_errorMethod · 0.70
get_instanceMethod · 0.70
get_security_groupMethod · 0.70
get_amiMethod · 0.70

Calls

no outgoing calls

Tested by 1