Skip to content

Commit

Permalink
fix: update tests/spec.json and Node Import
Browse files Browse the repository at this point in the history
Signed-off-by: Jay <[email protected]>
  • Loading branch information
35C4n0r committed Nov 17, 2023
1 parent db22b05 commit c429aa0
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 1 deletion.
2 changes: 1 addition & 1 deletion templates/node/tests/test_exception.js.twig
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{% if spec.definitions.appwriteException.errorTypes|length > 0 %}
const assert = require('assert');
const ErrorType = require('../lib/exception.js');
const { ErrorType } = require('../lib/exception.js');

try {
{% for error in spec.definitions.appwriteException.errorTypes %}
Expand Down
24 changes: 24 additions & 0 deletions tests/resources/spec.json
Original file line number Diff line number Diff line change
Expand Up @@ -1136,6 +1136,30 @@
"required": ["result"]
},
"appwriteException": {
"description": "Error Types",
"type": "object",
"properties": {
"description": {
"type": "string",
"description": "Error message.",
"x-example": "Invalid id: Parameter must be a valid number"
},
"type": {
"type": "string",
"description": "Error type.",
"enum": [
"general_mock",
"general_argument_invalid"
],
"x-example": "argument_invalid"
},
"code": {
"type": "integer",
"description": "Error code.",
"x-example": 400,
"format": "int32"
}
},
"x-appwrite": {
"types": [
{
Expand Down

0 comments on commit c429aa0

Please sign in to comment.