-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[1.2.0] Completed Milestones for 1.2.0 release
* [Issue #18] Changed Whitelist/Blacklist to Allowlist/Blocklist, Refactored Code, Improved Testing Code, Improved README.md grammar * [Issue #3] Introduced logic to check size of response. Refactored decorator exception handling. * [Issue #4] Introduced a function to collapse the output data and used this in the cfnresponse function * [1.2.0rc1] Documentation Pass to improve README.md * [Issue #2] Implemented Unit Tests * [Issue #21] Added the response headers for troubleshooting to the debug log output
- Loading branch information
1 parent
6134f3d
commit c416b40
Showing
12 changed files
with
576 additions
and
287 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,15 @@ | ||
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. | ||
# SPDX-License-Identifier: Apache-2.0 | ||
|
||
# Bring exceptions into the root of the submodule | ||
""" | ||
Bring exceptions into the root of the submodule | ||
""" | ||
|
||
from .exceptions import CannotApplyRuleToStandaloneRedactionConfig | ||
from .exceptions import ConflictingValue | ||
from .exceptions import NoPhysicalResourceIdException | ||
from .exceptions import InvalidResponseStatusException | ||
from .exceptions import DataIsNotDictException | ||
from .exceptions import FailedToSendResponseException | ||
from .exceptions import NotValidRequestObjectException | ||
from accustom.Exceptions.exceptions import CannotApplyRuleToStandaloneRedactionConfig | ||
from accustom.Exceptions.exceptions import ConflictingValue | ||
from accustom.Exceptions.exceptions import NoPhysicalResourceIdException | ||
from accustom.Exceptions.exceptions import InvalidResponseStatusException | ||
from accustom.Exceptions.exceptions import DataIsNotDictException | ||
from accustom.Exceptions.exceptions import FailedToSendResponseException | ||
from accustom.Exceptions.exceptions import NotValidRequestObjectException | ||
from accustom.Exceptions.exceptions import ResponseTooLongException |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,48 +1,64 @@ | ||
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. | ||
# SPDX-License-Identifier: Apache-2.0 | ||
|
||
""" Exceptions for the accustom library. | ||
""" | ||
Exceptions for the accustom library. | ||
These are the exceptions that can be returned by accustom | ||
""" | ||
|
||
|
||
class CannotApplyRuleToStandaloneRedactionConfig(Exception): | ||
"""Indicates that a second rule set was attempted to be applied to a standalone""" | ||
def __init__(self, *args, **kwargs): | ||
Exception.__init__(self, *args, **kwargs) | ||
|
||
def __init__(self, *args): | ||
Exception.__init__(self, *args) | ||
|
||
|
||
class ConflictingValue(Exception): | ||
"""Indicates that there is already a record with this value""" | ||
def __init__(self, *args, **kwargs): | ||
Exception.__init__(self, *args, **kwargs) | ||
|
||
def __init__(self, *args): | ||
Exception.__init__(self, *args) | ||
|
||
|
||
class NoPhysicalResourceIdException(Exception): | ||
"""Indicates that there was no valid value to use for PhysicalResourceId""" | ||
def __init__(self, *args, **kwargs): | ||
Exception.__init__(self, *args, **kwargs) | ||
|
||
def __init__(self, *args): | ||
Exception.__init__(self, *args) | ||
|
||
|
||
class InvalidResponseStatusException(Exception): | ||
"""Indicates that there response code was not SUCCESS or FAILED""" | ||
def __init__(self, *args, **kwargs): | ||
Exception.__init__(self, *args, **kwargs) | ||
|
||
def __init__(self, *args): | ||
Exception.__init__(self, *args) | ||
|
||
|
||
class DataIsNotDictException(Exception): | ||
"""Indicates that a Dictionary was not passed as Data""" | ||
def __init__(self, *args, **kwargs): | ||
Exception.__init__(self, *args, **kwargs) | ||
|
||
def __init__(self, *args): | ||
Exception.__init__(self, *args) | ||
|
||
|
||
class FailedToSendResponseException(Exception): | ||
"""Indicates there was a problem sending the response""" | ||
def __init__(self, *args, **kwargs): | ||
Exception.__init__(self, *args, **kwargs) | ||
|
||
def __init__(self, *args): | ||
Exception.__init__(self, *args) | ||
|
||
|
||
class NotValidRequestObjectException(Exception): | ||
"""Indicates that the event passed in is not a valid Request Object""" | ||
def __init__(self, *args, **kwargs): | ||
Exception.__init__(self, *args, **kwargs) | ||
|
||
def __init__(self, *args): | ||
Exception.__init__(self, *args) | ||
|
||
|
||
class ResponseTooLongException(Exception): | ||
"""Indicates that the produced response exceeds 4096 bytes and thus is too long""" | ||
|
||
def __init__(self, *args): | ||
Exception.__init__(self, *args) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.