-
Notifications
You must be signed in to change notification settings - Fork 171
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
🚀 Feature: Constants for Error Types #698
Comments
Hey @stnguyen90, I and @goswamianshuman are working on this, could you please assign it to us? |
Hey @stnguyen90, we are here now you can assign this PR to us.😄 |
@Haimantika I would like to work on this Issue. |
Hi @35C4n0r have assigned the issue to you! Thank you for showing interest in contributing to Appwrite! Happy Hacktoberfest 🎃 Notes: Please update us with your progress every 3 days, so that we know that you are working on it. |
I would like to work on this issue |
Hi, we are assigning issues on a first-come, first-serve basis, if @35C4n0r decides to drop off, we will assign it to you. |
Hey @Haimantika, i would like to work on this issue. |
Hi, we are assigning issues on a first-come, first-serve basis, if @35C4n0r decides to drop off, we will assign it to you. |
Hi @35C4n0r is there an update? The issue will be assigned to the next person in line soon due to inactivity |
Hi @Haimantika working on this, i've managed to understand the codebase, am still working on this issue. |
@stnguyen90 @Haimantika Line 50 in 2069238
Can you please inform me about the correct URL. For now i'm using \tests\resources\spec.json
|
@stnguyen90 should we put the enum in exceptions.*.twig or create a new file for it.
|
The specs are here.
In the exception file is fine.
FYI, we already have appwrite/appwrite#5979 open for the specs part, although we haven't finalized where in the specs the types should go. |
Commenting to get notified of any updates to this! |
🔖 Feature description
For the error types exposed here we should have a class with constants or an enum so we don't have to manually put the string in the code.
🎤 Pitch
Let say I want to display some error message specifically to the user depending on the type, so instead of doing this:
I could use the constant instead
Requirements
To implement this, we'll need to update the API specs to include the error types. For the API specs, we'll want to add an
AppwriteException
schema/definition like so:Note:
definitions.appwriteException
ordefinitions.appwriteException.properties.types
The SDK Generator should use the API specs to generate the enums with descriptions like:
So that the developer's IDE will show the description like:
Tasks
👀 Have you spent some time to check if this issue has been raised before?
🏢 Have you read the Code of Conduct?
The text was updated successfully, but these errors were encountered: