Skip to content

Commit 280bf14

Browse files
committed
updated spec
1 parent 4d208a9 commit 280bf14

File tree

1 file changed

+27
-15
lines changed

1 file changed

+27
-15
lines changed

scenarios/basics/inspector/SPECIFICATION.md

Lines changed: 27 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -85,21 +85,33 @@ By following this scenario, users learn how to:
8585

8686
## Errors
8787

88-
SDK Code examples include basic exception handling for each action used. The table below describes an appropriate exception which will be handled in the code for each service action.
89-
90-
|Action |Error |Handling |
91-
|--- |--- |--- |
92-
|`Enable` |ValidationException |Validate resource types and account permissions. |
93-
|`Enable` |AccessDeniedException |Notify user of insufficient permissions and exit. |
94-
|`BatchGetAccountStatus` |ValidationException |Validate account IDs format. |
95-
|`BatchGetAccountStatus` |AccessDeniedException |Handle permission errors gracefully. |
96-
|`ListFindings` |ValidationException |Validate filter criteria and pagination parameters. |
97-
|`ListFindings` |InternalServerException |Retry operation with exponential backoff. |
98-
|`BatchGetFindingDetails` |ValidationException |Validate finding ARNs format. |
99-
|`BatchGetFindingDetails` |AccessDeniedException |Handle access denied for specific findings. |
100-
|`ListCoverage` |ValidationException |Validate filter and pagination parameters. |
101-
|`Disable` |ValidationException |Validate resource types for disabling. |
102-
|`Disable` |ConflictException |Handle cases where Inspector cannot be disabled. |
88+
The Java SDK examples include basic exception handling for each Inspector action. The table below describes the exceptions actually handled in the program for each action.
89+
90+
| Action | Exception | Handling |
91+
|-------------------------------|---------------------------|--------------------------------------------------------------------------|
92+
| `Enable` | `ValidationException` | Prints a message indicating Inspector may already be enabled. |
93+
| `Enable` | `Inspector2Exception` | Prints AWS service error details and rethrows the exception. |
94+
| `Enable` | `Exception` | Wraps and throws a `RuntimeException` for unexpected errors. |
95+
| `BatchGetAccountStatus` | `Inspector2Exception` | Prints AWS service error details and rethrows the exception. |
96+
| `BatchGetAccountStatus` | `Exception` | Wraps and throws a `RuntimeException` for unexpected errors. |
97+
| `ListFindings` | `ValidationException` | Prints validation error details. |
98+
| `ListFindings` | `Inspector2Exception` | Prints AWS service error details and rethrows the exception. |
99+
| `ListFindings` | `Exception` | Wraps and throws a `RuntimeException` for unexpected errors. |
100+
| `ListCoverage` | `ValidationException` | Prints validation error details. |
101+
| `ListCoverage` | `Inspector2Exception` | Prints AWS service error details and rethrows the exception. |
102+
| `ListCoverage` | `Exception` | Wraps and throws a `RuntimeException` for unexpected errors. |
103+
| `ListCoverageStatistics` | `ValidationException` | Prints validation error details. |
104+
| `ListCoverageStatistics` | `Inspector2Exception` | Prints AWS service error details and rethrows the exception. |
105+
| `ListCoverageStatistics` | `Exception` | Wraps and throws a `RuntimeException` for unexpected errors. |
106+
| `ListUsageTotals` | `ValidationException` | Prints validation error details. |
107+
| `ListUsageTotals` | `Inspector2Exception` | Prints AWS service error details and rethrows the exception. |
108+
| `ListUsageTotals` | `Exception` | Wraps and throws a `RuntimeException` for unexpected errors. |
109+
| `CreateFilter` | `Inspector2Exception` | Prints AWS service error details and rethrows the exception. |
110+
| `CreateFilter` | `Exception` | Prints unexpected error message and rethrows the exception. |
111+
| `ListFilters` | `Inspector2Exception` | Prints AWS service error details and rethrows the exception. |
112+
| `ListFilters` | `Exception` | Prints unexpected error message and rethrows the exception. |
113+
| `getAccountStatus` | `Inspector2Exception` | Prints AWS service error details and rethrows the exception. |
114+
| `getAccountStatus` | `Exception` | Wraps and throws a `RuntimeException` for unexpected errors. |
103115

104116
## Metadata
105117

0 commit comments

Comments
 (0)