-
Notifications
You must be signed in to change notification settings - Fork 186
feat: added constants for Error Types #724
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
35C4n0r
wants to merge
24
commits into
appwrite:master
Choose a base branch
from
35C4n0r:feat-error-enum
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 1 commit
Commits
Show all changes
24 commits
Select commit
Hold shift + click to select a range
812a6e6
feat: added constants for Error Types
35C4n0r 061fea8
feat: added tests for Python ErrorEnums
35C4n0r 2c37098
feat: add tests for Ruby ErrorEnums
35C4n0r a07a4b6
feat: add tests EnumTests
35C4n0r 85fa20d
feat: add tests for ErrorEnums
35C4n0r 3f3afb0
update: update snake_case to camelCase
35C4n0r 33fe9cf
update: update test generator's data source.
35C4n0r ecb6742
Merge branch 'master' into feat-error-enum
35C4n0r 4f55b35
feat: add test_exception.py.twig
35C4n0r 273bb15
fix: fix AppwriteException Import
35C4n0r c57715a
fix: tests and ErrorEnums generated only if spec has Error info
35C4n0r 677f4cf
Merge branch 'master' into feat-error-enum
35C4n0r db22b05
feat: update tests/spec.json
35C4n0r c429aa0
fix: update tests/spec.json and Node Import
35C4n0r caf5d27
fix: remove Model if name has Exception in it.
35C4n0r dd855af
fix: remove space from Android class name.
35C4n0r d22707a
fix: remove space from Android class name.
35C4n0r c6b70d7
fix: fix camelCase to caseCamel in swift
35C4n0r 3350831
fix: fix ruby imports
35C4n0r c19f7ea
fix: fix ruby imports to exclude AppwriteException
35C4n0r cac17d0
fix: change pascal case to camel case
35C4n0r 2a9b36f
fix: fix lint errors
35C4n0r cd5111b
Merge branch 'master' into feat-error-enum
35C4n0r 4271b7c
refactor: refactor flutter files
35C4n0r File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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,7 +1,19 @@ | ||
from enum import Enum | ||
|
||
|
||
class {{spec.title | caseUcfirst}}Exception(Exception): | ||
def __init__(self, message, code = 0, type = None, response = None): | ||
self.message = message | ||
self.code = code | ||
self.type = type | ||
self.response = response | ||
super().__init__(self.message) | ||
super().__init__(self.message) | ||
|
||
|
||
class ErrorType(Enum): | ||
{% for error in spec.definitions.appwriteException.error_types %} | ||
""" | ||
{{ error.description }} | ||
""" | ||
{{ error.type|title|replace({'_': ''}) }} = '{{ error.type }}' | ||
{% endfor %} |
This file contains hidden or 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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.