• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Graph Store Error Codes
2
3> **NOTE**
4>
5> This topic describes only module-specific error codes. For details about universal error codes, see [Universal Error Codes](../errorcode-universal.md).
6
7##  31300000 Internal Error
8
9**Error Message**
10
11Inner error.
12
13**Description**
14
15Internal error.
16
17**Possible Causes**
18
19View the error log to determine the cause of the error. Possible causes include the following:
201. The GQL statement fails to be executed.
212. The internal state is abnormal.
223. There is API that is incorrectly used.
234. A system error, such as null pointer, unexpected restart of the data service, I/O error, or JS engine exception, occurs.
24
25**Solution**
26
271. Check whether the APIs are called correctly. If not, apply necessary corrections.
282. If the problem persists, ask the user to restart or update the application or upgrade the device version.
29
30##  31300001 Database File Corrupted
31
32**Error Message**
33
34Database corrupted.
35
36**Description**
37
38The database is corrupted when **read()** or **write()** is called.
39
40**Possible Causes**
41
42The database file is corrupted.
43
44**Solution**
45
46Currently, graph stores cannot be backed up or restored. If data loss is acceptable, delete the database and create a new one.
47
48## 31300002 Database or Transaction Closed
49
50**Error Message**
51
52Already closed.
53
54**Description**
55
56The graph store or transaction is already closed.
57
58**Possible Causes**
59
601. Before the current operation is performed, the graph store fails to be opened or [close](js-apis-data-graphStore-sys.md#close) is called to close the graph store.
612. Before the current operation is performed, [commit](js-apis-data-graphStore-sys.md#commit) is called to commit the transaction or [rollback](js-apis-data-graphStore-sys.md#rollback) is called to roll back the transaction.
62
63**Solution**
64
651. Call [getStore](js-apis-data-graphStore-sys.md#graphstoregetstore) to open the graph store again. Ensure that the input parameters are correct.
662. Call [createTransaction](js-apis-data-graphStore-sys.md#createtransaction) to create a transaction.
67
68## 31300003 Database not Respond
69
70**Error Message**
71
72The database is busy.
73
74**Description**
75
76The database does not respond.
77
78**Possible Causes**
79
801. The graph store is being accessed by multiple processes of the same application.
812. Multiple threads in a process perform read and write operations at the same time, resulting in timeout on a thread.
823. The data written by a transaction using [write](js-apis-data-graphStore-sys.md#write) has not been committed or rolled back.
83
84**Solution**
85
861. Avoid concurrent database operations from processes.
872. Wait for a while and try again.
883. Commit or roll back the unclosed transaction.
89
90## 31300004 Insufficient Memory
91
92**Error Message**
93
94The database is out of memory.
95
96**Description**
97
98The graph store memory is insufficient.
99
100**Possible Causes**
101
102The data volume is too large or the memory allocated is insufficient.
103
104**Solution**
105
106Reduce the data volume or clear other processes to release the memory.
107
108## 31300005 Database Is Full
109
110**Error Message**
111
112The database is full.
113
114**Description**
115
116The database is full.
117
118**Possible Causes**
119
120The data volume in the database reaches the upper limit or the disk space is insufficient.
121
122**Solution**
123
124Call [GraphStore.write](js-apis-data-graphStore-sys.md#write-1) or [Transaction.write](js-apis-data-graphStore-sys.md#write) to delete unnecessary data.
125
126## 31300006 Duplicate Graph Name, Vertex Type or Property, or Edge Type or Property
127
128**Error Message**
129
130A duplicate graph name, vertex or edge type, or vertex or edge property name exists.
131
132**Description**
133
134Duplicate graph name, vertex type or property, or edge type or property exists.
135
136**Possible Causes**
137
1381. A graph with the same name already exists in the database.
1392. Different vertexes use the same type or property.
1403. Different edges use the same type or property.
141
142**Solution**
143
144When using [GraphStore.write](js-apis-data-graphStore-sys.md#write-1) or [Transaction.write](js-apis-data-graphStore-sys.md#write) to create a graph, check the graph name, vertex type ([Vertex.labels](js-apis-data-graphStore-sys.md#vertex)) and properties ([Vertex.properties](js-apis-data-graphStore-sys.md#vertex)), and edge type ([Edge.type](js-apis-data-graphStore-sys.md#edge)) and properties ([Edge.labels](js-apis-data-graphStore-sys.md#edge)) in the graph creation statement to prevent conflict.
145
146## 31300007 Undefined Graph Name, Vertex Type or Property, or Edge Type or Property
147
148**Error Message**
149
150The graph name, vertex or edge type, or vertex or edge property is not defined.
151
152**Description**
153
154There is undefined graph name, vertex or edge type, or vertex or edge property.
155
156**Possible Causes**
157
158There is undefined graph name, vertex or edge type, or vertex or edge property.
159
160**Solution**
161
162Check for undefined graph name, vertex type ([Vertex.labels](js-apis-data-graphStore-sys.md#vertex)) or properties ([Vertex.properties](js-apis-data-graphStore-sys.md#vertex)), and edge type ([Edge.type](js-apis-data-graphStore-sys.md#edge)) or properties ([Edge.labels](js-apis-data-graphStore-sys.md#edge)) in [GraphStore.write](js-apis-data-graphStore-sys.md#write-1) or [Transaction.write](js-apis-data-graphStore-sys.md#write).
163
164## 31300008 Invalid Graph Name, Vertex Type or Property, or Edge Type or Property
165
166**Error Message**
167
168The graph name, vertex or edge type, or vertex or edge property name does not conform to constraints.
169
170**Description**
171
172The specified graph name, vertex or edge type, or vertex or edge property violates constraints.
173
174**Possible Causes**
175
1761. The graph name exceeds 128 bytes.
1772. The primary keys conflict.
1783. Duplicate identifiers exist.
179
180**Solution**
181
182When using [GraphStore.write](js-apis-data-graphStore-sys.md#write-1) or [Transaction.write](js-apis-data-graphStore-sys.md#write) to create a graph, check the graph name, vertex type ([Vertex.labels](js-apis-data-graphStore-sys.md#vertex)) and properties ([Vertex.properties](js-apis-data-graphStore-sys.md#vertex)), and edge type ([Edge.type](js-apis-data-graphStore-sys.md#edge)) and properties ([Edge.labels](js-apis-data-graphStore-sys.md#edge)) in the graph creation statement to prevent conflict.
183
184## 31300009 Syntax Error in the GQL Statement
185
186**Error Message**
187
188The GQL statement syntax error.
189
190**Description**
191
192The GQL statement has a syntax error.
193
194**Possible Causes**
195
196There is syntax error in the GQL statement.
197
198**Solution**
199
200Check and correct the syntax error in the GQL statement.
201
202## 31300010 Semantic Error in the GQL Statement
203
204**Error Message**
205
206The GQL statement semantic error.
207
208**Description**
209
210The GQL statement has a semantic error.
211
212**Possible Causes**
213
214There is a semantic error in the GQL statement.
215
216**Solution**
217
218Check and correct the semantic error in the GQL statement.
219
220## 31300012 Number of Graphs, Vertex Types or Properties, or Edge Types or Properties Exceeds the Limit
221
222**Error Message**
223
224The number of graph names, vertex or edge types, or vertex or edge properties exceeds the limit.
225
226**Description**
227
228The number of graph names, vertex types or properties, or edge types or properties exceeds the limit.
229
230**Possible Causes**
231
232The number of graph names, vertex types or properties, or edge types or properties exceeds the limit.
233
234**Solution**
235
236Reduce the number of vertex or edge types or properties. A graph store allows only one graph and a maximum of 1024 vertex or edge properties.
237
238## 31300013 Conflict Constraints
239
240**Error Message**
241
242A conflicting constraint already exists.
243
244**Description**
245
246Conflict constraints are found.
247
248**Possible Causes**
249
250There are primary key conflicts, identifier conflicts, or other syntax conflicts.
251
252**Solution**
253
254Check for and resolve conflicts in the GQL statement.
255
256## 31300014 Invalid Database Path
257
258**Error Message**
259
260Invalid database path.
261
262**Description**
263
264The graph store path is invalid.
265
266**Possible Causes**
267
268Access to the graph store is denied due to lack of permission.
269
270**Solution**
271
272Currently, graph stores do not support custom paths. The default sandbox path in [Context](../apis-ability-kit/js-apis-inner-app-context.md) is used. Correct the code by referring to the sample code in [getStore](js-apis-data-graphStore-sys.md#graphstoregetstore).
273
274## 31300015 Key Configuration Changed
275
276**Error Message**
277
278Config changed.
279
280**Description**
281
282The key configuration of the graph store has been modified.
283
284**Possible Causes**
285
286Key configuration such as **name**, **securityLevel**, and **encrypt** is changed.
287
288**Solution**
289
290Restore the original configuration if required. Otherwise, delete the old graph store, use the new configuration to create a graph store, and import the data to the new graph store. **securityLevel** cannot be changed from a higher level to a lower one.
291