Skip to content

Commit c429aa0

Browse files
committed
fix: update tests/spec.json and Node Import
Signed-off-by: Jay <jaykumar20march@gmail.com>
1 parent db22b05 commit c429aa0

File tree

2 files changed

+25
-1
lines changed

2 files changed

+25
-1
lines changed

templates/node/tests/test_exception.js.twig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{% if spec.definitions.appwriteException.errorTypes|length > 0 %}
22
const assert = require('assert');
3-
const ErrorType = require('../lib/exception.js');
3+
const { ErrorType } = require('../lib/exception.js');
44

55
try {
66
{% for error in spec.definitions.appwriteException.errorTypes %}

tests/resources/spec.json

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1136,6 +1136,30 @@
11361136
"required": ["result"]
11371137
},
11381138
"appwriteException": {
1139+
"description": "Error Types",
1140+
"type": "object",
1141+
"properties": {
1142+
"description": {
1143+
"type": "string",
1144+
"description": "Error message.",
1145+
"x-example": "Invalid id: Parameter must be a valid number"
1146+
},
1147+
"type": {
1148+
"type": "string",
1149+
"description": "Error type.",
1150+
"enum": [
1151+
"general_mock",
1152+
"general_argument_invalid"
1153+
],
1154+
"x-example": "argument_invalid"
1155+
},
1156+
"code": {
1157+
"type": "integer",
1158+
"description": "Error code.",
1159+
"x-example": 400,
1160+
"format": "int32"
1161+
}
1162+
},
11391163
"x-appwrite": {
11401164
"types": [
11411165
{

0 commit comments

Comments
 (0)