Skip to content

Commit

Permalink
Add UnnecessaryEncodingUsed warning type
Browse files Browse the repository at this point in the history
  • Loading branch information
jshcodes committed Aug 24, 2023
1 parent 2350976 commit 7db1ad6
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 4 deletions.
6 changes: 4 additions & 2 deletions src/falconpy/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,8 @@
PayloadValidationError,
NoAuthenticationMechanism,
InvalidIndex,
InvalidCredentialFormat
InvalidCredentialFormat,
UnnecessaryEncodingUsed
)
from ._result import (
Result,
Expand Down Expand Up @@ -170,7 +171,8 @@
"InterfaceConfiguration", "RequestBehavior", "RequestConnection", "RequestMeta",
"RequestPayloads", "RequestValidator", "PayloadValidationError", "MIN_TOKEN_RENEW_WINDOW",
"MAX_TOKEN_RENEW_WINDOW", "GLOBAL_API_MAX_RETURN", "MOCK_OPERATIONS",
"NoAuthenticationMechanism", "InvalidIndex", "version", "InvalidCredentialFormat"
"NoAuthenticationMechanism", "InvalidIndex", "version", "InvalidCredentialFormat",
"UnnecessaryEncodingUsed"
]
"""
This is free and unencumbered software released into the public domain.
Expand Down
5 changes: 3 additions & 2 deletions src/falconpy/_error/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,8 @@
SDKWarning,
SSLDisabledWarning,
NoContentWarning,
NoAuthenticationMechanism
NoAuthenticationMechanism,
UnnecessaryEncodingUsed
)


Expand All @@ -65,5 +66,5 @@
"InvalidCredentials", "APIError", "NoContentWarning", "CannotRevokeToken",
"FunctionalityNotImplemented", "InvalidBaseURL", "PayloadValidationError",
"NoAuthenticationMechanism", "FeatureNotSupportedByPythonVersion",
"InvalidIndex", "InvalidCredentialFormat"
"InvalidIndex", "InvalidCredentialFormat", "UnnecessaryEncodingUsed"
]
7 changes: 7 additions & 0 deletions src/falconpy/_error/_warnings.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,3 +95,10 @@ class NoAuthenticationMechanism(SDKWarning):

_code = 400
_message = "No authentication mechanism has been specified for this class."


class UnnecessaryEncodingUsed(SDKWarning):
"""An argument was urlencoded when it should not be."""

_code = 400
_message = "A provided argument utilizes unnecessary encoding."

0 comments on commit 7db1ad6

Please sign in to comment.