freestyle 0.1.51 → 0.1.52

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (6) hide show
  1. package/README.md +1 -1
  2. package/index.cjs +1220 -611
  3. package/index.d.cts +607 -304
  4. package/index.d.mts +607 -304
  5. package/index.mjs +1220 -611
  6. package/package.json +1 -1
package/index.mjs CHANGED
@@ -1,19 +1,22 @@
1
1
  import path__default from 'path';
2
2
 
3
- function errorFromJSON(body) {
3
+ function errorFromJSON(body, traceId) {
4
4
  const ErrorClass = FREESTYLE_ERROR_CODE_MAP[body.code];
5
5
  if (ErrorClass) {
6
- return new ErrorClass(body);
6
+ return new ErrorClass(body, traceId);
7
7
  } else {
8
- return new Error(`Unknown error code: ${body.code} - ${body.description}`);
8
+ return new Error(`Unknown error code: ${body.code} - ${body.description}${traceId ? `
9
+ TraceId: ${traceId}` : ""}`);
9
10
  }
10
11
  }
11
12
  class GitErrorError extends Error {
12
- constructor(body) {
13
+ constructor(body, traceId) {
13
14
  super(
14
- `GIT_ERROR: ${body.message}`
15
+ `GIT_ERROR: ${body.message}${traceId ? `
16
+ TraceId: ${traceId}` : ""}`
15
17
  );
16
18
  this.body = body;
19
+ this.traceId = traceId;
17
20
  this.name = "GitErrorError";
18
21
  }
19
22
  static code = "GIT_ERROR";
@@ -21,11 +24,13 @@ class GitErrorError extends Error {
21
24
  static description = `{message}`;
22
25
  }
23
26
  class BadParseError extends Error {
24
- constructor(body) {
27
+ constructor(body, traceId) {
25
28
  super(
26
- `BAD_PARSE: ${body.message}`
29
+ `BAD_PARSE: ${body.message}${traceId ? `
30
+ TraceId: ${traceId}` : ""}`
27
31
  );
28
32
  this.body = body;
33
+ this.traceId = traceId;
29
34
  this.name = "BadParseError";
30
35
  }
31
36
  static code = "BAD_PARSE";
@@ -33,11 +38,13 @@ class BadParseError extends Error {
33
38
  static description = `error parsing event object: {0}`;
34
39
  }
35
40
  class BadTimestampError extends Error {
36
- constructor(body) {
41
+ constructor(body, traceId) {
37
42
  super(
38
- `BAD_TIMESTAMP: ${body.message}`
43
+ `BAD_TIMESTAMP: ${body.message}${traceId ? `
44
+ TraceId: ${traceId}` : ""}`
39
45
  );
40
46
  this.body = body;
47
+ this.traceId = traceId;
41
48
  this.name = "BadTimestampError";
42
49
  }
43
50
  static code = "BAD_TIMESTAMP";
@@ -45,11 +52,13 @@ class BadTimestampError extends Error {
45
52
  static description = `error comparing timestamps - over tolerance`;
46
53
  }
47
54
  class BadSignatureError extends Error {
48
- constructor(body) {
55
+ constructor(body, traceId) {
49
56
  super(
50
- `BAD_SIGNATURE: ${body.message}`
57
+ `BAD_SIGNATURE: ${body.message}${traceId ? `
58
+ TraceId: ${traceId}` : ""}`
51
59
  );
52
60
  this.body = body;
61
+ this.traceId = traceId;
53
62
  this.name = "BadSignatureError";
54
63
  }
55
64
  static code = "BAD_SIGNATURE";
@@ -57,11 +66,13 @@ class BadSignatureError extends Error {
57
66
  static description = `error comparing signatures`;
58
67
  }
59
68
  class BadHeaderError extends Error {
60
- constructor(body) {
69
+ constructor(body, traceId) {
61
70
  super(
62
- `BAD_HEADER: ${body.message}`
71
+ `BAD_HEADER: ${body.message}${traceId ? `
72
+ TraceId: ${traceId}` : ""}`
63
73
  );
64
74
  this.body = body;
75
+ this.traceId = traceId;
65
76
  this.name = "BadHeaderError";
66
77
  }
67
78
  static code = "BAD_HEADER";
@@ -69,11 +80,13 @@ class BadHeaderError extends Error {
69
80
  static description = `error parsing timestamp: {0}`;
70
81
  }
71
82
  class BadKeyError extends Error {
72
- constructor(body) {
83
+ constructor(body, traceId) {
73
84
  super(
74
- `BAD_KEY: ${body.message}`
85
+ `BAD_KEY: ${body.message}${traceId ? `
86
+ TraceId: ${traceId}` : ""}`
75
87
  );
76
88
  this.body = body;
89
+ this.traceId = traceId;
77
90
  this.name = "BadKeyError";
78
91
  }
79
92
  static code = "BAD_KEY";
@@ -81,11 +94,13 @@ class BadKeyError extends Error {
81
94
  static description = `invalid key length`;
82
95
  }
83
96
  class VmOperationDeniedDuringTransactionError extends Error {
84
- constructor(body) {
97
+ constructor(body, traceId) {
85
98
  super(
86
- `VM_OPERATION_DENIED_DURING_TRANSACTION: ${body.message}`
99
+ `VM_OPERATION_DENIED_DURING_TRANSACTION: ${body.message}${traceId ? `
100
+ TraceId: ${traceId}` : ""}`
87
101
  );
88
102
  this.body = body;
103
+ this.traceId = traceId;
89
104
  this.name = "VmOperationDeniedDuringTransactionError";
90
105
  }
91
106
  static code = "VM_OPERATION_DENIED_DURING_TRANSACTION";
@@ -93,11 +108,13 @@ class VmOperationDeniedDuringTransactionError extends Error {
93
108
  static description = `VM operation denied during active transaction for VM {vm_id} in transaction {transaction_id}`;
94
109
  }
95
110
  class VmTransactionIdMismatchError extends Error {
96
- constructor(body) {
111
+ constructor(body, traceId) {
97
112
  super(
98
- `VM_TRANSACTION_ID_MISMATCH: ${body.message}`
113
+ `VM_TRANSACTION_ID_MISMATCH: ${body.message}${traceId ? `
114
+ TraceId: ${traceId}` : ""}`
99
115
  );
100
116
  this.body = body;
117
+ this.traceId = traceId;
101
118
  this.name = "VmTransactionIdMismatchError";
102
119
  }
103
120
  static code = "VM_TRANSACTION_ID_MISMATCH";
@@ -105,11 +122,13 @@ class VmTransactionIdMismatchError extends Error {
105
122
  static description = `Transaction ID {provided_transaction_id} does not match the current VM transaction {expected_transaction_id} for VM {vm_id}`;
106
123
  }
107
124
  class VmNotInTransactionError extends Error {
108
- constructor(body) {
125
+ constructor(body, traceId) {
109
126
  super(
110
- `VM_NOT_IN_TRANSACTION: ${body.message}`
127
+ `VM_NOT_IN_TRANSACTION: ${body.message}${traceId ? `
128
+ TraceId: ${traceId}` : ""}`
111
129
  );
112
130
  this.body = body;
131
+ this.traceId = traceId;
113
132
  this.name = "VmNotInTransactionError";
114
133
  }
115
134
  static code = "VM_NOT_IN_TRANSACTION";
@@ -117,11 +136,13 @@ class VmNotInTransactionError extends Error {
117
136
  static description = `VM not in a transaction: {vm_id}`;
118
137
  }
119
138
  class PartitionNotFoundError extends Error {
120
- constructor(body) {
139
+ constructor(body, traceId) {
121
140
  super(
122
- `PARTITION_NOT_FOUND: ${body.message}`
141
+ `PARTITION_NOT_FOUND: ${body.message}${traceId ? `
142
+ TraceId: ${traceId}` : ""}`
123
143
  );
124
144
  this.body = body;
145
+ this.traceId = traceId;
125
146
  this.name = "PartitionNotFoundError";
126
147
  }
127
148
  static code = "PARTITION_NOT_FOUND";
@@ -129,11 +150,13 @@ class PartitionNotFoundError extends Error {
129
150
  static description = `Partition not found: {partition_id}`;
130
151
  }
131
152
  class UserNotFoundError extends Error {
132
- constructor(body) {
153
+ constructor(body, traceId) {
133
154
  super(
134
- `USER_NOT_FOUND: ${body.message}`
155
+ `USER_NOT_FOUND: ${body.message}${traceId ? `
156
+ TraceId: ${traceId}` : ""}`
135
157
  );
136
158
  this.body = body;
159
+ this.traceId = traceId;
137
160
  this.name = "UserNotFoundError";
138
161
  }
139
162
  static code = "USER_NOT_FOUND";
@@ -141,11 +164,13 @@ class UserNotFoundError extends Error {
141
164
  static description = `User not found: {user_name}`;
142
165
  }
143
166
  class UserAlreadyExistsError extends Error {
144
- constructor(body) {
167
+ constructor(body, traceId) {
145
168
  super(
146
- `USER_ALREADY_EXISTS: ${body.message}`
169
+ `USER_ALREADY_EXISTS: ${body.message}${traceId ? `
170
+ TraceId: ${traceId}` : ""}`
147
171
  );
148
172
  this.body = body;
173
+ this.traceId = traceId;
149
174
  this.name = "UserAlreadyExistsError";
150
175
  }
151
176
  static code = "USER_ALREADY_EXISTS";
@@ -153,11 +178,13 @@ class UserAlreadyExistsError extends Error {
153
178
  static description = `Conflict: User '{user_name}' already exists`;
154
179
  }
155
180
  class ValidationErrorError extends Error {
156
- constructor(body) {
181
+ constructor(body, traceId) {
157
182
  super(
158
- `VALIDATION_ERROR: ${body.message}`
183
+ `VALIDATION_ERROR: ${body.message}${traceId ? `
184
+ TraceId: ${traceId}` : ""}`
159
185
  );
160
186
  this.body = body;
187
+ this.traceId = traceId;
161
188
  this.name = "ValidationErrorError";
162
189
  }
163
190
  static code = "VALIDATION_ERROR";
@@ -165,11 +192,13 @@ class ValidationErrorError extends Error {
165
192
  static description = `Validation error: {message}`;
166
193
  }
167
194
  class GroupNotFoundError extends Error {
168
- constructor(body) {
195
+ constructor(body, traceId) {
169
196
  super(
170
- `GROUP_NOT_FOUND: ${body.message}`
197
+ `GROUP_NOT_FOUND: ${body.message}${traceId ? `
198
+ TraceId: ${traceId}` : ""}`
171
199
  );
172
200
  this.body = body;
201
+ this.traceId = traceId;
173
202
  this.name = "GroupNotFoundError";
174
203
  }
175
204
  static code = "GROUP_NOT_FOUND";
@@ -177,11 +206,13 @@ class GroupNotFoundError extends Error {
177
206
  static description = `Group not found: {group_name}`;
178
207
  }
179
208
  class GroupAlreadyExistsError extends Error {
180
- constructor(body) {
209
+ constructor(body, traceId) {
181
210
  super(
182
- `GROUP_ALREADY_EXISTS: ${body.message}`
211
+ `GROUP_ALREADY_EXISTS: ${body.message}${traceId ? `
212
+ TraceId: ${traceId}` : ""}`
183
213
  );
184
214
  this.body = body;
215
+ this.traceId = traceId;
185
216
  this.name = "GroupAlreadyExistsError";
186
217
  }
187
218
  static code = "GROUP_ALREADY_EXISTS";
@@ -189,11 +220,13 @@ class GroupAlreadyExistsError extends Error {
189
220
  static description = `Conflict: Group '{group_name}' already exists`;
190
221
  }
191
222
  class DuplicateUserNameError extends Error {
192
- constructor(body) {
223
+ constructor(body, traceId) {
193
224
  super(
194
- `DUPLICATE_USER_NAME: ${body.message}`
225
+ `DUPLICATE_USER_NAME: ${body.message}${traceId ? `
226
+ TraceId: ${traceId}` : ""}`
195
227
  );
196
228
  this.body = body;
229
+ this.traceId = traceId;
197
230
  this.name = "DuplicateUserNameError";
198
231
  }
199
232
  static code = "DUPLICATE_USER_NAME";
@@ -201,11 +234,13 @@ class DuplicateUserNameError extends Error {
201
234
  static description = `Duplicate user name '{name}' found`;
202
235
  }
203
236
  class UserGroupEmptyError extends Error {
204
- constructor(body) {
237
+ constructor(body, traceId) {
205
238
  super(
206
- `USER_GROUP_EMPTY: ${body.message}`
239
+ `USER_GROUP_EMPTY: ${body.message}${traceId ? `
240
+ TraceId: ${traceId}` : ""}`
207
241
  );
208
242
  this.body = body;
243
+ this.traceId = traceId;
209
244
  this.name = "UserGroupEmptyError";
210
245
  }
211
246
  static code = "USER_GROUP_EMPTY";
@@ -213,11 +248,13 @@ class UserGroupEmptyError extends Error {
213
248
  static description = `User '{user}' has empty string in groups`;
214
249
  }
215
250
  class UserSystemFlagMismatchError extends Error {
216
- constructor(body) {
251
+ constructor(body, traceId) {
217
252
  super(
218
- `USER_SYSTEM_FLAG_MISMATCH: ${body.message}`
253
+ `USER_SYSTEM_FLAG_MISMATCH: ${body.message}${traceId ? `
254
+ TraceId: ${traceId}` : ""}`
219
255
  );
220
256
  this.body = body;
257
+ this.traceId = traceId;
221
258
  this.name = "UserSystemFlagMismatchError";
222
259
  }
223
260
  static code = "USER_SYSTEM_FLAG_MISMATCH";
@@ -225,11 +262,13 @@ class UserSystemFlagMismatchError extends Error {
225
262
  static description = `User '{user}' has system=true but UID {uid} is > 999 (system range)`;
226
263
  }
227
264
  class UserUidOutOfRangeError extends Error {
228
- constructor(body) {
265
+ constructor(body, traceId) {
229
266
  super(
230
- `USER_UID_OUT_OF_RANGE: ${body.message}`
267
+ `USER_UID_OUT_OF_RANGE: ${body.message}${traceId ? `
268
+ TraceId: ${traceId}` : ""}`
231
269
  );
232
270
  this.body = body;
271
+ this.traceId = traceId;
233
272
  this.name = "UserUidOutOfRangeError";
234
273
  }
235
274
  static code = "USER_UID_OUT_OF_RANGE";
@@ -237,11 +276,13 @@ class UserUidOutOfRangeError extends Error {
237
276
  static description = `User '{user}' has invalid UID {uid} (must be 0-65535)`;
238
277
  }
239
278
  class UserHomeInvalidError extends Error {
240
- constructor(body) {
279
+ constructor(body, traceId) {
241
280
  super(
242
- `USER_HOME_INVALID: ${body.message}`
281
+ `USER_HOME_INVALID: ${body.message}${traceId ? `
282
+ TraceId: ${traceId}` : ""}`
243
283
  );
244
284
  this.body = body;
285
+ this.traceId = traceId;
245
286
  this.name = "UserHomeInvalidError";
246
287
  }
247
288
  static code = "USER_HOME_INVALID";
@@ -249,11 +290,13 @@ class UserHomeInvalidError extends Error {
249
290
  static description = `User '{user}' has invalid home path '{home}' (must be absolute path starting with /)`;
250
291
  }
251
292
  class UserShellInvalidError extends Error {
252
- constructor(body) {
293
+ constructor(body, traceId) {
253
294
  super(
254
- `USER_SHELL_INVALID: ${body.message}`
295
+ `USER_SHELL_INVALID: ${body.message}${traceId ? `
296
+ TraceId: ${traceId}` : ""}`
255
297
  );
256
298
  this.body = body;
299
+ this.traceId = traceId;
257
300
  this.name = "UserShellInvalidError";
258
301
  }
259
302
  static code = "USER_SHELL_INVALID";
@@ -261,11 +304,13 @@ class UserShellInvalidError extends Error {
261
304
  static description = `User '{user}' has invalid shell path '{shell}' (must be absolute path starting with /)`;
262
305
  }
263
306
  class DuplicateGroupNameError extends Error {
264
- constructor(body) {
307
+ constructor(body, traceId) {
265
308
  super(
266
- `DUPLICATE_GROUP_NAME: ${body.message}`
309
+ `DUPLICATE_GROUP_NAME: ${body.message}${traceId ? `
310
+ TraceId: ${traceId}` : ""}`
267
311
  );
268
312
  this.body = body;
313
+ this.traceId = traceId;
269
314
  this.name = "DuplicateGroupNameError";
270
315
  }
271
316
  static code = "DUPLICATE_GROUP_NAME";
@@ -273,11 +318,13 @@ class DuplicateGroupNameError extends Error {
273
318
  static description = `Duplicate group name '{name}' found`;
274
319
  }
275
320
  class GroupNameReservedError extends Error {
276
- constructor(body) {
321
+ constructor(body, traceId) {
277
322
  super(
278
- `GROUP_NAME_RESERVED: ${body.message}`
323
+ `GROUP_NAME_RESERVED: ${body.message}${traceId ? `
324
+ TraceId: ${traceId}` : ""}`
279
325
  );
280
326
  this.body = body;
327
+ this.traceId = traceId;
281
328
  this.name = "GroupNameReservedError";
282
329
  }
283
330
  static code = "GROUP_NAME_RESERVED";
@@ -285,11 +332,13 @@ class GroupNameReservedError extends Error {
285
332
  static description = `Group name '{name}' is reserved and cannot be used`;
286
333
  }
287
334
  class GroupNameInvalidCharsError extends Error {
288
- constructor(body) {
335
+ constructor(body, traceId) {
289
336
  super(
290
- `GROUP_NAME_INVALID_CHARS: ${body.message}`
337
+ `GROUP_NAME_INVALID_CHARS: ${body.message}${traceId ? `
338
+ TraceId: ${traceId}` : ""}`
291
339
  );
292
340
  this.body = body;
341
+ this.traceId = traceId;
293
342
  this.name = "GroupNameInvalidCharsError";
294
343
  }
295
344
  static code = "GROUP_NAME_INVALID_CHARS";
@@ -297,11 +346,13 @@ class GroupNameInvalidCharsError extends Error {
297
346
  static description = `Group name '{name}' contains invalid characters (must match [a-z_][a-z0-9_-]*)`;
298
347
  }
299
348
  class GroupNameTooLongError extends Error {
300
- constructor(body) {
349
+ constructor(body, traceId) {
301
350
  super(
302
- `GROUP_NAME_TOO_LONG: ${body.message}`
351
+ `GROUP_NAME_TOO_LONG: ${body.message}${traceId ? `
352
+ TraceId: ${traceId}` : ""}`
303
353
  );
304
354
  this.body = body;
355
+ this.traceId = traceId;
305
356
  this.name = "GroupNameTooLongError";
306
357
  }
307
358
  static code = "GROUP_NAME_TOO_LONG";
@@ -309,11 +360,13 @@ class GroupNameTooLongError extends Error {
309
360
  static description = `Group name '{name}' is too long (max {max_length} characters)`;
310
361
  }
311
362
  class GroupNameEmptyError extends Error {
312
- constructor(body) {
363
+ constructor(body, traceId) {
313
364
  super(
314
- `GROUP_NAME_EMPTY: ${body.message}`
365
+ `GROUP_NAME_EMPTY: ${body.message}${traceId ? `
366
+ TraceId: ${traceId}` : ""}`
315
367
  );
316
368
  this.body = body;
369
+ this.traceId = traceId;
317
370
  this.name = "GroupNameEmptyError";
318
371
  }
319
372
  static code = "GROUP_NAME_EMPTY";
@@ -321,11 +374,13 @@ class GroupNameEmptyError extends Error {
321
374
  static description = `Group name cannot be empty`;
322
375
  }
323
376
  class NoDefaultSnapshotAvailableError extends Error {
324
- constructor(body) {
377
+ constructor(body, traceId) {
325
378
  super(
326
- `NO_DEFAULT_SNAPSHOT_AVAILABLE: ${body.message}`
379
+ `NO_DEFAULT_SNAPSHOT_AVAILABLE: ${body.message}${traceId ? `
380
+ TraceId: ${traceId}` : ""}`
327
381
  );
328
382
  this.body = body;
383
+ this.traceId = traceId;
329
384
  this.name = "NoDefaultSnapshotAvailableError";
330
385
  }
331
386
  static code = "NO_DEFAULT_SNAPSHOT_AVAILABLE";
@@ -333,11 +388,13 @@ class NoDefaultSnapshotAvailableError extends Error {
333
388
  static description = `No default snapshot available for account {account_id}`;
334
389
  }
335
390
  class DockerSnapshotFailedError extends Error {
336
- constructor(body) {
391
+ constructor(body, traceId) {
337
392
  super(
338
- `DOCKER_SNAPSHOT_FAILED: ${body.message}`
393
+ `DOCKER_SNAPSHOT_FAILED: ${body.message}${traceId ? `
394
+ TraceId: ${traceId}` : ""}`
339
395
  );
340
396
  this.body = body;
397
+ this.traceId = traceId;
341
398
  this.name = "DockerSnapshotFailedError";
342
399
  }
343
400
  static code = "DOCKER_SNAPSHOT_FAILED";
@@ -345,11 +402,13 @@ class DockerSnapshotFailedError extends Error {
345
402
  static description = `Failed to create snapshot from Docker image {docker_image} for account {account_id}: {details}`;
346
403
  }
347
404
  class SetDefaultSnapshotFailedError extends Error {
348
- constructor(body) {
405
+ constructor(body, traceId) {
349
406
  super(
350
- `SET_DEFAULT_SNAPSHOT_FAILED: ${body.message}`
407
+ `SET_DEFAULT_SNAPSHOT_FAILED: ${body.message}${traceId ? `
408
+ TraceId: ${traceId}` : ""}`
351
409
  );
352
410
  this.body = body;
411
+ this.traceId = traceId;
353
412
  this.name = "SetDefaultSnapshotFailedError";
354
413
  }
355
414
  static code = "SET_DEFAULT_SNAPSHOT_FAILED";
@@ -357,11 +416,13 @@ class SetDefaultSnapshotFailedError extends Error {
357
416
  static description = `Failed to update default snapshot in database for account {account_id}, snapshot {snapshot_id}: {details}`;
358
417
  }
359
418
  class SnapshotLayerCreationFailedError extends Error {
360
- constructor(body) {
419
+ constructor(body, traceId) {
361
420
  super(
362
- `SNAPSHOT_LAYER_CREATION_FAILED: ${body.message}`
421
+ `SNAPSHOT_LAYER_CREATION_FAILED: ${body.message}${traceId ? `
422
+ TraceId: ${traceId}` : ""}`
363
423
  );
364
424
  this.body = body;
425
+ this.traceId = traceId;
365
426
  this.name = "SnapshotLayerCreationFailedError";
366
427
  }
367
428
  static code = "SNAPSHOT_LAYER_CREATION_FAILED";
@@ -369,11 +430,13 @@ class SnapshotLayerCreationFailedError extends Error {
369
430
  static description = `Failed to create snapshot layer for account {account_id} from {source_snapshot_dir}: {details}`;
370
431
  }
371
432
  class SnapshotDirNotFoundError extends Error {
372
- constructor(body) {
433
+ constructor(body, traceId) {
373
434
  super(
374
- `SNAPSHOT_DIR_NOT_FOUND: ${body.message}`
435
+ `SNAPSHOT_DIR_NOT_FOUND: ${body.message}${traceId ? `
436
+ TraceId: ${traceId}` : ""}`
375
437
  );
376
438
  this.body = body;
439
+ this.traceId = traceId;
377
440
  this.name = "SnapshotDirNotFoundError";
378
441
  }
379
442
  static code = "SNAPSHOT_DIR_NOT_FOUND";
@@ -381,11 +444,13 @@ class SnapshotDirNotFoundError extends Error {
381
444
  static description = `Snapshot directory not found at {snapshot_dir} for account {account_id}, snapshot {snapshot_id}`;
382
445
  }
383
446
  class SubvolumeCreationFailedError extends Error {
384
- constructor(body) {
447
+ constructor(body, traceId) {
385
448
  super(
386
- `SUBVOLUME_CREATION_FAILED: ${body.message}`
449
+ `SUBVOLUME_CREATION_FAILED: ${body.message}${traceId ? `
450
+ TraceId: ${traceId}` : ""}`
387
451
  );
388
452
  this.body = body;
453
+ this.traceId = traceId;
389
454
  this.name = "SubvolumeCreationFailedError";
390
455
  }
391
456
  static code = "SUBVOLUME_CREATION_FAILED";
@@ -393,11 +458,13 @@ class SubvolumeCreationFailedError extends Error {
393
458
  static description = `Failed to create account subvolume for account {account_id}: {details}`;
394
459
  }
395
460
  class GetDefaultSnapshotFailedError extends Error {
396
- constructor(body) {
461
+ constructor(body, traceId) {
397
462
  super(
398
- `GET_DEFAULT_SNAPSHOT_FAILED: ${body.message}`
463
+ `GET_DEFAULT_SNAPSHOT_FAILED: ${body.message}${traceId ? `
464
+ TraceId: ${traceId}` : ""}`
399
465
  );
400
466
  this.body = body;
467
+ this.traceId = traceId;
401
468
  this.name = "GetDefaultSnapshotFailedError";
402
469
  }
403
470
  static code = "GET_DEFAULT_SNAPSHOT_FAILED";
@@ -405,11 +472,13 @@ class GetDefaultSnapshotFailedError extends Error {
405
472
  static description = `Failed to query account default snapshot for account {account_id}: {details}`;
406
473
  }
407
474
  class VmNotFoundInFsError extends Error {
408
- constructor(body) {
475
+ constructor(body, traceId) {
409
476
  super(
410
- `VM_NOT_FOUND_IN_FS: ${body.message}`
477
+ `VM_NOT_FOUND_IN_FS: ${body.message}${traceId ? `
478
+ TraceId: ${traceId}` : ""}`
411
479
  );
412
480
  this.body = body;
481
+ this.traceId = traceId;
413
482
  this.name = "VmNotFoundInFsError";
414
483
  }
415
484
  static code = "VM_NOT_FOUND_IN_FS";
@@ -417,11 +486,13 @@ class VmNotFoundInFsError extends Error {
417
486
  static description = `Vm Not found in filesystem`;
418
487
  }
419
488
  class DatabaseErrorError extends Error {
420
- constructor(body) {
489
+ constructor(body, traceId) {
421
490
  super(
422
- `DATABASE_ERROR: ${body.message}`
491
+ `DATABASE_ERROR: ${body.message}${traceId ? `
492
+ TraceId: ${traceId}` : ""}`
423
493
  );
424
494
  this.body = body;
495
+ this.traceId = traceId;
425
496
  this.name = "DatabaseErrorError";
426
497
  }
427
498
  static code = "DATABASE_ERROR";
@@ -429,11 +500,13 @@ class DatabaseErrorError extends Error {
429
500
  static description = `Database error occurred while constructing VmRecord, details: {details}`;
430
501
  }
431
502
  class InvalidVmIdError extends Error {
432
- constructor(body) {
503
+ constructor(body, traceId) {
433
504
  super(
434
- `INVALID_VM_ID: ${body.message}`
505
+ `INVALID_VM_ID: ${body.message}${traceId ? `
506
+ TraceId: ${traceId}` : ""}`
435
507
  );
436
508
  this.body = body;
509
+ this.traceId = traceId;
437
510
  this.name = "InvalidVmIdError";
438
511
  }
439
512
  static code = "INVALID_VM_ID";
@@ -441,11 +514,13 @@ class InvalidVmIdError extends Error {
441
514
  static description = `Invalid VM ID: {vm_id}, details: {details}`;
442
515
  }
443
516
  class VmDeletedError extends Error {
444
- constructor(body) {
517
+ constructor(body, traceId) {
445
518
  super(
446
- `VM_DELETED: ${body.message}`
519
+ `VM_DELETED: ${body.message}${traceId ? `
520
+ TraceId: ${traceId}` : ""}`
447
521
  );
448
522
  this.body = body;
523
+ this.traceId = traceId;
449
524
  this.name = "VmDeletedError";
450
525
  }
451
526
  static code = "VM_DELETED";
@@ -453,11 +528,13 @@ class VmDeletedError extends Error {
453
528
  static description = `Vm {vm_id} is marked as deleted but still exists in the database`;
454
529
  }
455
530
  class VmNotRunningError extends Error {
456
- constructor(body) {
531
+ constructor(body, traceId) {
457
532
  super(
458
- `VM_NOT_RUNNING: ${body.message}`
533
+ `VM_NOT_RUNNING: ${body.message}${traceId ? `
534
+ TraceId: ${traceId}` : ""}`
459
535
  );
460
536
  this.body = body;
537
+ this.traceId = traceId;
461
538
  this.name = "VmNotRunningError";
462
539
  }
463
540
  static code = "VM_NOT_RUNNING";
@@ -465,11 +542,13 @@ class VmNotRunningError extends Error {
465
542
  static description = `Stopped VM not running`;
466
543
  }
467
544
  class ActiveTransactionErrorError extends Error {
468
- constructor(body) {
545
+ constructor(body, traceId) {
469
546
  super(
470
- `ACTIVE_TRANSACTION_ERROR: ${body.message}`
547
+ `ACTIVE_TRANSACTION_ERROR: ${body.message}${traceId ? `
548
+ TraceId: ${traceId}` : ""}`
471
549
  );
472
550
  this.body = body;
551
+ this.traceId = traceId;
473
552
  this.name = "ActiveTransactionErrorError";
474
553
  }
475
554
  static code = "ACTIVE_TRANSACTION_ERROR";
@@ -477,11 +556,13 @@ class ActiveTransactionErrorError extends Error {
477
556
  static description = `Active transaction error: {details}`;
478
557
  }
479
558
  class SwapVmTapError extends Error {
480
- constructor(body) {
559
+ constructor(body, traceId) {
481
560
  super(
482
- `SWAP_VM_TAP: ${body.message}`
561
+ `SWAP_VM_TAP: ${body.message}${traceId ? `
562
+ TraceId: ${traceId}` : ""}`
483
563
  );
484
564
  this.body = body;
565
+ this.traceId = traceId;
485
566
  this.name = "SwapVmTapError";
486
567
  }
487
568
  static code = "SWAP_VM_TAP";
@@ -489,11 +570,13 @@ class SwapVmTapError extends Error {
489
570
  static description = `Failed to swap tap device: {details}`;
490
571
  }
491
572
  class PreassignedVmIdCountMismatchError extends Error {
492
- constructor(body) {
573
+ constructor(body, traceId) {
493
574
  super(
494
- `PREASSIGNED_VM_ID_COUNT_MISMATCH: ${body.message}`
575
+ `PREASSIGNED_VM_ID_COUNT_MISMATCH: ${body.message}${traceId ? `
576
+ TraceId: ${traceId}` : ""}`
495
577
  );
496
578
  this.body = body;
579
+ this.traceId = traceId;
497
580
  this.name = "PreassignedVmIdCountMismatchError";
498
581
  }
499
582
  static code = "PREASSIGNED_VM_ID_COUNT_MISMATCH";
@@ -501,11 +584,13 @@ class PreassignedVmIdCountMismatchError extends Error {
501
584
  static description = `Pre-provisioned vm_ids length ({provided}) must match fork count ({count})`;
502
585
  }
503
586
  class InternalErrorError extends Error {
504
- constructor(body) {
587
+ constructor(body, traceId) {
505
588
  super(
506
- `INTERNAL_ERROR: ${body.message}`
589
+ `INTERNAL_ERROR: ${body.message}${traceId ? `
590
+ TraceId: ${traceId}` : ""}`
507
591
  );
508
592
  this.body = body;
593
+ this.traceId = traceId;
509
594
  this.name = "InternalErrorError";
510
595
  }
511
596
  static code = "INTERNAL_ERROR";
@@ -513,11 +598,13 @@ class InternalErrorError extends Error {
513
598
  static description = `Fork failed: {message}`;
514
599
  }
515
600
  class RootfsCopyErrorError extends Error {
516
- constructor(body) {
601
+ constructor(body, traceId) {
517
602
  super(
518
- `ROOTFS_COPY_ERROR: ${body.message}`
603
+ `ROOTFS_COPY_ERROR: ${body.message}${traceId ? `
604
+ TraceId: ${traceId}` : ""}`
519
605
  );
520
606
  this.body = body;
607
+ this.traceId = traceId;
521
608
  this.name = "RootfsCopyErrorError";
522
609
  }
523
610
  static code = "ROOTFS_COPY_ERROR";
@@ -525,11 +612,13 @@ class RootfsCopyErrorError extends Error {
525
612
  static description = `Failed to copy rootfs from {from} to {to}: {details}`;
526
613
  }
527
614
  class FileNotFoundError extends Error {
528
- constructor(body) {
615
+ constructor(body, traceId) {
529
616
  super(
530
- `FILE_NOT_FOUND: ${body.message}`
617
+ `FILE_NOT_FOUND: ${body.message}${traceId ? `
618
+ TraceId: ${traceId}` : ""}`
531
619
  );
532
620
  this.body = body;
621
+ this.traceId = traceId;
533
622
  this.name = "FileNotFoundError";
534
623
  }
535
624
  static code = "FILE_NOT_FOUND";
@@ -537,11 +626,13 @@ class FileNotFoundError extends Error {
537
626
  static description = `File not found: {path}`;
538
627
  }
539
628
  class FilesBadRequestError extends Error {
540
- constructor(body) {
629
+ constructor(body, traceId) {
541
630
  super(
542
- `FILES_BAD_REQUEST: ${body.message}`
631
+ `FILES_BAD_REQUEST: ${body.message}${traceId ? `
632
+ TraceId: ${traceId}` : ""}`
543
633
  );
544
634
  this.body = body;
635
+ this.traceId = traceId;
545
636
  this.name = "FilesBadRequestError";
546
637
  }
547
638
  static code = "FILES_BAD_REQUEST";
@@ -549,11 +640,13 @@ class FilesBadRequestError extends Error {
549
640
  static description = `Bad request: {message}`;
550
641
  }
551
642
  class VmNotFoundError extends Error {
552
- constructor(body) {
643
+ constructor(body, traceId) {
553
644
  super(
554
- `VM_NOT_FOUND: ${body.message}`
645
+ `VM_NOT_FOUND: ${body.message}${traceId ? `
646
+ TraceId: ${traceId}` : ""}`
555
647
  );
556
648
  this.body = body;
649
+ this.traceId = traceId;
557
650
  this.name = "VmNotFoundError";
558
651
  }
559
652
  static code = "VM_NOT_FOUND";
@@ -561,11 +654,13 @@ class VmNotFoundError extends Error {
561
654
  static description = `VM not found: {vm_id}`;
562
655
  }
563
656
  class InternalForkVmNotFoundError extends Error {
564
- constructor(body) {
657
+ constructor(body, traceId) {
565
658
  super(
566
- `INTERNAL_FORK_VM_NOT_FOUND: ${body.message}`
659
+ `INTERNAL_FORK_VM_NOT_FOUND: ${body.message}${traceId ? `
660
+ TraceId: ${traceId}` : ""}`
567
661
  );
568
662
  this.body = body;
663
+ this.traceId = traceId;
569
664
  this.name = "InternalForkVmNotFoundError";
570
665
  }
571
666
  static code = "INTERNAL_FORK_VM_NOT_FOUND";
@@ -573,11 +668,13 @@ class InternalForkVmNotFoundError extends Error {
573
668
  static description = `The VM you're trying to fork from was not found: {fork_vm_id}`;
574
669
  }
575
670
  class BadRequestError extends Error {
576
- constructor(body) {
671
+ constructor(body, traceId) {
577
672
  super(
578
- `BAD_REQUEST: ${body.message}`
673
+ `BAD_REQUEST: ${body.message}${traceId ? `
674
+ TraceId: ${traceId}` : ""}`
579
675
  );
580
676
  this.body = body;
677
+ this.traceId = traceId;
581
678
  this.name = "BadRequestError";
582
679
  }
583
680
  static code = "BAD_REQUEST";
@@ -585,11 +682,13 @@ class BadRequestError extends Error {
585
682
  static description = `Bad request: {message}`;
586
683
  }
587
684
  class InternalVmNotFoundError extends Error {
588
- constructor(body) {
685
+ constructor(body, traceId) {
589
686
  super(
590
- `INTERNAL_VM_NOT_FOUND: ${body.message}`
687
+ `INTERNAL_VM_NOT_FOUND: ${body.message}${traceId ? `
688
+ TraceId: ${traceId}` : ""}`
591
689
  );
592
690
  this.body = body;
691
+ this.traceId = traceId;
593
692
  this.name = "InternalVmNotFoundError";
594
693
  }
595
694
  static code = "INTERNAL_VM_NOT_FOUND";
@@ -597,11 +696,13 @@ class InternalVmNotFoundError extends Error {
597
696
  static description = `VM not found: {vm_id}`;
598
697
  }
599
698
  class SnapshotIsAccountDefaultError extends Error {
600
- constructor(body) {
699
+ constructor(body, traceId) {
601
700
  super(
602
- `SNAPSHOT_IS_ACCOUNT_DEFAULT: ${body.message}`
701
+ `SNAPSHOT_IS_ACCOUNT_DEFAULT: ${body.message}${traceId ? `
702
+ TraceId: ${traceId}` : ""}`
603
703
  );
604
704
  this.body = body;
705
+ this.traceId = traceId;
605
706
  this.name = "SnapshotIsAccountDefaultError";
606
707
  }
607
708
  static code = "SNAPSHOT_IS_ACCOUNT_DEFAULT";
@@ -609,11 +710,13 @@ class SnapshotIsAccountDefaultError extends Error {
609
710
  static description = `Snapshot is the account default and cannot be deleted: {snapshot_id}`;
610
711
  }
611
712
  class SnapshotAlreadyDeletedError extends Error {
612
- constructor(body) {
713
+ constructor(body, traceId) {
613
714
  super(
614
- `SNAPSHOT_ALREADY_DELETED: ${body.message}`
715
+ `SNAPSHOT_ALREADY_DELETED: ${body.message}${traceId ? `
716
+ TraceId: ${traceId}` : ""}`
615
717
  );
616
718
  this.body = body;
719
+ this.traceId = traceId;
617
720
  this.name = "SnapshotAlreadyDeletedError";
618
721
  }
619
722
  static code = "SNAPSHOT_ALREADY_DELETED";
@@ -621,11 +724,13 @@ class SnapshotAlreadyDeletedError extends Error {
621
724
  static description = `Snapshot already deleted: {snapshot_id}`;
622
725
  }
623
726
  class SnapshotNotFoundError extends Error {
624
- constructor(body) {
727
+ constructor(body, traceId) {
625
728
  super(
626
- `SNAPSHOT_NOT_FOUND: ${body.message}`
729
+ `SNAPSHOT_NOT_FOUND: ${body.message}${traceId ? `
730
+ TraceId: ${traceId}` : ""}`
627
731
  );
628
732
  this.body = body;
733
+ this.traceId = traceId;
629
734
  this.name = "SnapshotNotFoundError";
630
735
  }
631
736
  static code = "SNAPSHOT_NOT_FOUND";
@@ -633,11 +738,13 @@ class SnapshotNotFoundError extends Error {
633
738
  static description = `Snapshot not found: {snapshot_id}`;
634
739
  }
635
740
  class SnapshotSetupFailedError extends Error {
636
- constructor(body) {
741
+ constructor(body, traceId) {
637
742
  super(
638
- `SNAPSHOT_SETUP_FAILED: ${body.message}`
743
+ `SNAPSHOT_SETUP_FAILED: ${body.message}${traceId ? `
744
+ TraceId: ${traceId}` : ""}`
639
745
  );
640
746
  this.body = body;
747
+ this.traceId = traceId;
641
748
  this.name = "SnapshotSetupFailedError";
642
749
  }
643
750
  static code = "SNAPSHOT_SETUP_FAILED";
@@ -645,11 +752,13 @@ class SnapshotSetupFailedError extends Error {
645
752
  static description = `Snapshot setup failed: {failed_reason}`;
646
753
  }
647
754
  class SnapshotVmBadRequestError extends Error {
648
- constructor(body) {
755
+ constructor(body, traceId) {
649
756
  super(
650
- `SNAPSHOT_VM_BAD_REQUEST: ${body.message}`
757
+ `SNAPSHOT_VM_BAD_REQUEST: ${body.message}${traceId ? `
758
+ TraceId: ${traceId}` : ""}`
651
759
  );
652
760
  this.body = body;
761
+ this.traceId = traceId;
653
762
  this.name = "SnapshotVmBadRequestError";
654
763
  }
655
764
  static code = "SNAPSHOT_VM_BAD_REQUEST";
@@ -657,11 +766,13 @@ class SnapshotVmBadRequestError extends Error {
657
766
  static description = `Bad request: {message}`;
658
767
  }
659
768
  class StartingHandleInstanceIdMismatchError extends Error {
660
- constructor(body) {
769
+ constructor(body, traceId) {
661
770
  super(
662
- `STARTING_HANDLE_INSTANCE_ID_MISMATCH: ${body.message}`
771
+ `STARTING_HANDLE_INSTANCE_ID_MISMATCH: ${body.message}${traceId ? `
772
+ TraceId: ${traceId}` : ""}`
663
773
  );
664
774
  this.body = body;
775
+ this.traceId = traceId;
665
776
  this.name = "StartingHandleInstanceIdMismatchError";
666
777
  }
667
778
  static code = "STARTING_HANDLE_INSTANCE_ID_MISMATCH";
@@ -669,11 +780,13 @@ class StartingHandleInstanceIdMismatchError extends Error {
669
780
  static description = `Starting handle for VM {vm_id} is held by instance {actual_instance_id}, not {provided_instance_id}`;
670
781
  }
671
782
  class SuspendFailedAndStopFailedError extends Error {
672
- constructor(body) {
783
+ constructor(body, traceId) {
673
784
  super(
674
- `SUSPEND_FAILED_AND_STOP_FAILED: ${body.message}`
785
+ `SUSPEND_FAILED_AND_STOP_FAILED: ${body.message}${traceId ? `
786
+ TraceId: ${traceId}` : ""}`
675
787
  );
676
788
  this.body = body;
789
+ this.traceId = traceId;
677
790
  this.name = "SuspendFailedAndStopFailedError";
678
791
  }
679
792
  static code = "SUSPEND_FAILED_AND_STOP_FAILED";
@@ -681,11 +794,13 @@ class SuspendFailedAndStopFailedError extends Error {
681
794
  static description = `Failed to gracefully suspend or stop VM`;
682
795
  }
683
796
  class SuspendFailedAndStoppedError extends Error {
684
- constructor(body) {
797
+ constructor(body, traceId) {
685
798
  super(
686
- `SUSPEND_FAILED_AND_STOPPED: ${body.message}`
799
+ `SUSPEND_FAILED_AND_STOPPED: ${body.message}${traceId ? `
800
+ TraceId: ${traceId}` : ""}`
687
801
  );
688
802
  this.body = body;
803
+ this.traceId = traceId;
689
804
  this.name = "SuspendFailedAndStoppedError";
690
805
  }
691
806
  static code = "SUSPEND_FAILED_AND_STOPPED";
@@ -693,11 +808,13 @@ class SuspendFailedAndStoppedError extends Error {
693
808
  static description = `Failed to gracefully suspend, stopped VM`;
694
809
  }
695
810
  class ResizeVmMemNotPowerOfTwoError extends Error {
696
- constructor(body) {
811
+ constructor(body, traceId) {
697
812
  super(
698
- `RESIZE_VM_MEM_NOT_POWER_OF_TWO: ${body.message}`
813
+ `RESIZE_VM_MEM_NOT_POWER_OF_TWO: ${body.message}${traceId ? `
814
+ TraceId: ${traceId}` : ""}`
699
815
  );
700
816
  this.body = body;
817
+ this.traceId = traceId;
701
818
  this.name = "ResizeVmMemNotPowerOfTwoError";
702
819
  }
703
820
  static code = "RESIZE_VM_MEM_NOT_POWER_OF_TWO";
@@ -705,11 +822,13 @@ class ResizeVmMemNotPowerOfTwoError extends Error {
705
822
  static description = `memSizeMb must be a power of two in MiB (got {got} MiB)`;
706
823
  }
707
824
  class ResizeVmVcpuNotPowerOfTwoError extends Error {
708
- constructor(body) {
825
+ constructor(body, traceId) {
709
826
  super(
710
- `RESIZE_VM_VCPU_NOT_POWER_OF_TWO: ${body.message}`
827
+ `RESIZE_VM_VCPU_NOT_POWER_OF_TWO: ${body.message}${traceId ? `
828
+ TraceId: ${traceId}` : ""}`
711
829
  );
712
830
  this.body = body;
831
+ this.traceId = traceId;
713
832
  this.name = "ResizeVmVcpuNotPowerOfTwoError";
714
833
  }
715
834
  static code = "RESIZE_VM_VCPU_NOT_POWER_OF_TWO";
@@ -717,11 +836,13 @@ class ResizeVmVcpuNotPowerOfTwoError extends Error {
717
836
  static description = `vcpuCount must be a power of two (got {got})`;
718
837
  }
719
838
  class ResizeVmMemOutOfRangeError extends Error {
720
- constructor(body) {
839
+ constructor(body, traceId) {
721
840
  super(
722
- `RESIZE_VM_MEM_OUT_OF_RANGE: ${body.message}`
841
+ `RESIZE_VM_MEM_OUT_OF_RANGE: ${body.message}${traceId ? `
842
+ TraceId: ${traceId}` : ""}`
723
843
  );
724
844
  this.body = body;
845
+ this.traceId = traceId;
725
846
  this.name = "ResizeVmMemOutOfRangeError";
726
847
  }
727
848
  static code = "RESIZE_VM_MEM_OUT_OF_RANGE";
@@ -729,11 +850,13 @@ class ResizeVmMemOutOfRangeError extends Error {
729
850
  static description = `memSizeMb out of range (got {got}MiB, allowed {min}..={max} MiB)`;
730
851
  }
731
852
  class ResizeVmVcpuOutOfRangeError extends Error {
732
- constructor(body) {
853
+ constructor(body, traceId) {
733
854
  super(
734
- `RESIZE_VM_VCPU_OUT_OF_RANGE: ${body.message}`
855
+ `RESIZE_VM_VCPU_OUT_OF_RANGE: ${body.message}${traceId ? `
856
+ TraceId: ${traceId}` : ""}`
735
857
  );
736
858
  this.body = body;
859
+ this.traceId = traceId;
737
860
  this.name = "ResizeVmVcpuOutOfRangeError";
738
861
  }
739
862
  static code = "RESIZE_VM_VCPU_OUT_OF_RANGE";
@@ -741,11 +864,13 @@ class ResizeVmVcpuOutOfRangeError extends Error {
741
864
  static description = `vcpuCount out of range (got {got}, allowed 1..={max})`;
742
865
  }
743
866
  class ResizeVmRootfsShrinkNotSupportedError extends Error {
744
- constructor(body) {
867
+ constructor(body, traceId) {
745
868
  super(
746
- `RESIZE_VM_ROOTFS_SHRINK_NOT_SUPPORTED: ${body.message}`
869
+ `RESIZE_VM_ROOTFS_SHRINK_NOT_SUPPORTED: ${body.message}${traceId ? `
870
+ TraceId: ${traceId}` : ""}`
747
871
  );
748
872
  this.body = body;
873
+ this.traceId = traceId;
749
874
  this.name = "ResizeVmRootfsShrinkNotSupportedError";
750
875
  }
751
876
  static code = "RESIZE_VM_ROOTFS_SHRINK_NOT_SUPPORTED";
@@ -753,11 +878,13 @@ class ResizeVmRootfsShrinkNotSupportedError extends Error {
753
878
  static description = `Rootfs shrink is not supported (current={current_mb}MiB, requested={requested_mb}MiB)`;
754
879
  }
755
880
  class ResizeVmEmptyRequestError extends Error {
756
- constructor(body) {
881
+ constructor(body, traceId) {
757
882
  super(
758
- `RESIZE_VM_EMPTY_REQUEST: ${body.message}`
883
+ `RESIZE_VM_EMPTY_REQUEST: ${body.message}${traceId ? `
884
+ TraceId: ${traceId}` : ""}`
759
885
  );
760
886
  this.body = body;
887
+ this.traceId = traceId;
761
888
  this.name = "ResizeVmEmptyRequestError";
762
889
  }
763
890
  static code = "RESIZE_VM_EMPTY_REQUEST";
@@ -765,11 +892,13 @@ class ResizeVmEmptyRequestError extends Error {
765
892
  static description = `Resize request must specify at least one of vcpuCount, memSizeMb, or rootfsSizeMb`;
766
893
  }
767
894
  class ExecTimedOutError extends Error {
768
- constructor(body) {
895
+ constructor(body, traceId) {
769
896
  super(
770
- `EXEC_TIMED_OUT: ${body.message}`
897
+ `EXEC_TIMED_OUT: ${body.message}${traceId ? `
898
+ TraceId: ${traceId}` : ""}`
771
899
  );
772
900
  this.body = body;
901
+ this.traceId = traceId;
773
902
  this.name = "ExecTimedOutError";
774
903
  }
775
904
  static code = "EXEC_TIMED_OUT";
@@ -777,11 +906,13 @@ class ExecTimedOutError extends Error {
777
906
  static description = `Command timed out after {timeout_ms}ms`;
778
907
  }
779
908
  class ConflictingSpecSourcesErrorError extends Error {
780
- constructor(body) {
909
+ constructor(body, traceId) {
781
910
  super(
782
- `CONFLICTING_SPEC_SOURCES_ERROR: ${body.message}`
911
+ `CONFLICTING_SPEC_SOURCES_ERROR: ${body.message}${traceId ? `
912
+ TraceId: ${traceId}` : ""}`
783
913
  );
784
914
  this.body = body;
915
+ this.traceId = traceId;
785
916
  this.name = "ConflictingSpecSourcesErrorError";
786
917
  }
787
918
  static code = "CONFLICTING_SPEC_SOURCES_ERROR";
@@ -789,11 +920,13 @@ class ConflictingSpecSourcesErrorError extends Error {
789
920
  static description = `Spec layer at depth {depth} has conflicting base sources \`{field_a}\` and \`{field_b}\`; each layer may set at most one of \`snapshot\`, \`snapshotId\`, \`baseImage\``;
790
921
  }
791
922
  class NonLeafLayerFieldErrorError extends Error {
792
- constructor(body) {
923
+ constructor(body, traceId) {
793
924
  super(
794
- `NON_LEAF_LAYER_FIELD_ERROR: ${body.message}`
925
+ `NON_LEAF_LAYER_FIELD_ERROR: ${body.message}${traceId ? `
926
+ TraceId: ${traceId}` : ""}`
795
927
  );
796
928
  this.body = body;
929
+ this.traceId = traceId;
797
930
  this.name = "NonLeafLayerFieldErrorError";
798
931
  }
799
932
  static code = "NON_LEAF_LAYER_FIELD_ERROR";
@@ -801,11 +934,13 @@ class NonLeafLayerFieldErrorError extends Error {
801
934
  static description = `Field \`{field}\` may only be set on the innermost spec layer; found on a non-leaf layer at depth {depth} (0 = outermost)`;
802
935
  }
803
936
  class InvalidGitRepoSpecErrorError extends Error {
804
- constructor(body) {
937
+ constructor(body, traceId) {
805
938
  super(
806
- `INVALID_GIT_REPO_SPEC_ERROR: ${body.message}`
939
+ `INVALID_GIT_REPO_SPEC_ERROR: ${body.message}${traceId ? `
940
+ TraceId: ${traceId}` : ""}`
807
941
  );
808
942
  this.body = body;
943
+ this.traceId = traceId;
809
944
  this.name = "InvalidGitRepoSpecErrorError";
810
945
  }
811
946
  static code = "INVALID_GIT_REPO_SPEC_ERROR";
@@ -813,11 +948,13 @@ class InvalidGitRepoSpecErrorError extends Error {
813
948
  static description = `Cannot specify both root-level \`gitRepos\` and \`git.repos\`. Prefer \`git.repos\`.`;
814
949
  }
815
950
  class ForkVmNotFoundError extends Error {
816
- constructor(body) {
951
+ constructor(body, traceId) {
817
952
  super(
818
- `FORK_VM_NOT_FOUND: ${body.message}`
953
+ `FORK_VM_NOT_FOUND: ${body.message}${traceId ? `
954
+ TraceId: ${traceId}` : ""}`
819
955
  );
820
956
  this.body = body;
957
+ this.traceId = traceId;
821
958
  this.name = "ForkVmNotFoundError";
822
959
  }
823
960
  static code = "FORK_VM_NOT_FOUND";
@@ -825,11 +962,13 @@ class ForkVmNotFoundError extends Error {
825
962
  static description = `Fork VM not found: {fork_vm_id}`;
826
963
  }
827
964
  class CreateSnapshotBadRequestError extends Error {
828
- constructor(body) {
965
+ constructor(body, traceId) {
829
966
  super(
830
- `CREATE_SNAPSHOT_BAD_REQUEST: ${body.message}`
967
+ `CREATE_SNAPSHOT_BAD_REQUEST: ${body.message}${traceId ? `
968
+ TraceId: ${traceId}` : ""}`
831
969
  );
832
970
  this.body = body;
971
+ this.traceId = traceId;
833
972
  this.name = "CreateSnapshotBadRequestError";
834
973
  }
835
974
  static code = "CREATE_SNAPSHOT_BAD_REQUEST";
@@ -837,11 +976,13 @@ class CreateSnapshotBadRequestError extends Error {
837
976
  static description = `Bad request: {message}`;
838
977
  }
839
978
  class UnsupportedOsError extends Error {
840
- constructor(body) {
979
+ constructor(body, traceId) {
841
980
  super(
842
- `UNSUPPORTED_OS: ${body.message}`
981
+ `UNSUPPORTED_OS: ${body.message}${traceId ? `
982
+ TraceId: ${traceId}` : ""}`
843
983
  );
844
984
  this.body = body;
985
+ this.traceId = traceId;
845
986
  this.name = "UnsupportedOsError";
846
987
  }
847
988
  static code = "UNSUPPORTED_OS";
@@ -849,11 +990,13 @@ class UnsupportedOsError extends Error {
849
990
  static description = `Unsupported base image OS: {os}`;
850
991
  }
851
992
  class BuildFailedError extends Error {
852
- constructor(body) {
993
+ constructor(body, traceId) {
853
994
  super(
854
- `BUILD_FAILED: ${body.message}`
995
+ `BUILD_FAILED: ${body.message}${traceId ? `
996
+ TraceId: ${traceId}` : ""}`
855
997
  );
856
998
  this.body = body;
999
+ this.traceId = traceId;
857
1000
  this.name = "BuildFailedError";
858
1001
  }
859
1002
  static code = "BUILD_FAILED";
@@ -861,11 +1004,13 @@ class BuildFailedError extends Error {
861
1004
  static description = `Dockerfile build failed (exit {exit_code})`;
862
1005
  }
863
1006
  class ResumedVmNonResponsiveError extends Error {
864
- constructor(body) {
1007
+ constructor(body, traceId) {
865
1008
  super(
866
- `RESUMED_VM_NON_RESPONSIVE: ${body.message}`
1009
+ `RESUMED_VM_NON_RESPONSIVE: ${body.message}${traceId ? `
1010
+ TraceId: ${traceId}` : ""}`
867
1011
  );
868
1012
  this.body = body;
1013
+ this.traceId = traceId;
869
1014
  this.name = "ResumedVmNonResponsiveError";
870
1015
  }
871
1016
  static code = "RESUMED_VM_NON_RESPONSIVE";
@@ -873,11 +1018,13 @@ class ResumedVmNonResponsiveError extends Error {
873
1018
  static description = `Resumed VM {vm_id} is not responsive after {timeout_seconds}s`;
874
1019
  }
875
1020
  class SnapshotLoadTimeoutError extends Error {
876
- constructor(body) {
1021
+ constructor(body, traceId) {
877
1022
  super(
878
- `SNAPSHOT_LOAD_TIMEOUT: ${body.message}`
1023
+ `SNAPSHOT_LOAD_TIMEOUT: ${body.message}${traceId ? `
1024
+ TraceId: ${traceId}` : ""}`
879
1025
  );
880
1026
  this.body = body;
1027
+ this.traceId = traceId;
881
1028
  this.name = "SnapshotLoadTimeoutError";
882
1029
  }
883
1030
  static code = "SNAPSHOT_LOAD_TIMEOUT";
@@ -885,11 +1032,13 @@ class SnapshotLoadTimeoutError extends Error {
885
1032
  static description = `Snapshot load timed out after {elapsed_seconds}s for instance {vm_instance_id}, logs: {log_path}`;
886
1033
  }
887
1034
  class UffdTimeoutErrorError extends Error {
888
- constructor(body) {
1035
+ constructor(body, traceId) {
889
1036
  super(
890
- `UFFD_TIMEOUT_ERROR: ${body.message}`
1037
+ `UFFD_TIMEOUT_ERROR: ${body.message}${traceId ? `
1038
+ TraceId: ${traceId}` : ""}`
891
1039
  );
892
1040
  this.body = body;
1041
+ this.traceId = traceId;
893
1042
  this.name = "UffdTimeoutErrorError";
894
1043
  }
895
1044
  static code = "UFFD_TIMEOUT_ERROR";
@@ -897,11 +1046,13 @@ class UffdTimeoutErrorError extends Error {
897
1046
  static description = `UFFD socket timeout: {report_socket_path}, logs: {log_path}`;
898
1047
  }
899
1048
  class KernelPanicError extends Error {
900
- constructor(body) {
1049
+ constructor(body, traceId) {
901
1050
  super(
902
- `KERNEL_PANIC: ${body.message}`
1051
+ `KERNEL_PANIC: ${body.message}${traceId ? `
1052
+ TraceId: ${traceId}` : ""}`
903
1053
  );
904
1054
  this.body = body;
1055
+ this.traceId = traceId;
905
1056
  this.name = "KernelPanicError";
906
1057
  }
907
1058
  static code = "KERNEL_PANIC";
@@ -909,11 +1060,13 @@ class KernelPanicError extends Error {
909
1060
  static description = `VM kernel panic detected`;
910
1061
  }
911
1062
  class ReqwestError extends Error {
912
- constructor(body) {
1063
+ constructor(body, traceId) {
913
1064
  super(
914
- `REQWEST: ${body.message}`
1065
+ `REQWEST: ${body.message}${traceId ? `
1066
+ TraceId: ${traceId}` : ""}`
915
1067
  );
916
1068
  this.body = body;
1069
+ this.traceId = traceId;
917
1070
  this.name = "ReqwestError";
918
1071
  }
919
1072
  static code = "REQWEST";
@@ -921,11 +1074,13 @@ class ReqwestError extends Error {
921
1074
  static description = `Reqwest error: {details}`;
922
1075
  }
923
1076
  class FirecrackerPidNotFoundError extends Error {
924
- constructor(body) {
1077
+ constructor(body, traceId) {
925
1078
  super(
926
- `FIRECRACKER_PID_NOT_FOUND: ${body.message}`
1079
+ `FIRECRACKER_PID_NOT_FOUND: ${body.message}${traceId ? `
1080
+ TraceId: ${traceId}` : ""}`
927
1081
  );
928
1082
  this.body = body;
1083
+ this.traceId = traceId;
929
1084
  this.name = "FirecrackerPidNotFoundError";
930
1085
  }
931
1086
  static code = "FIRECRACKER_PID_NOT_FOUND";
@@ -933,11 +1088,13 @@ class FirecrackerPidNotFoundError extends Error {
933
1088
  static description = `Firecracker PID not found`;
934
1089
  }
935
1090
  class FirecrackerApiSocketNotFoundError extends Error {
936
- constructor(body) {
1091
+ constructor(body, traceId) {
937
1092
  super(
938
- `FIRECRACKER_API_SOCKET_NOT_FOUND: ${body.message}`
1093
+ `FIRECRACKER_API_SOCKET_NOT_FOUND: ${body.message}${traceId ? `
1094
+ TraceId: ${traceId}` : ""}`
939
1095
  );
940
1096
  this.body = body;
1097
+ this.traceId = traceId;
941
1098
  this.name = "FirecrackerApiSocketNotFoundError";
942
1099
  }
943
1100
  static code = "FIRECRACKER_API_SOCKET_NOT_FOUND";
@@ -945,11 +1102,13 @@ class FirecrackerApiSocketNotFoundError extends Error {
945
1102
  static description = `Firecracker API socket not found`;
946
1103
  }
947
1104
  class InvalidSnapshotIdError extends Error {
948
- constructor(body) {
1105
+ constructor(body, traceId) {
949
1106
  super(
950
- `INVALID_SNAPSHOT_ID: ${body.message}`
1107
+ `INVALID_SNAPSHOT_ID: ${body.message}${traceId ? `
1108
+ TraceId: ${traceId}` : ""}`
951
1109
  );
952
1110
  this.body = body;
1111
+ this.traceId = traceId;
953
1112
  this.name = "InvalidSnapshotIdError";
954
1113
  }
955
1114
  static code = "INVALID_SNAPSHOT_ID";
@@ -957,11 +1116,13 @@ class InvalidSnapshotIdError extends Error {
957
1116
  static description = `Invalid snapshot id: {id}`;
958
1117
  }
959
1118
  class VmStartTimeoutError extends Error {
960
- constructor(body) {
1119
+ constructor(body, traceId) {
961
1120
  super(
962
- `VM_START_TIMEOUT: ${body.message}`
1121
+ `VM_START_TIMEOUT: ${body.message}${traceId ? `
1122
+ TraceId: ${traceId}` : ""}`
963
1123
  );
964
1124
  this.body = body;
1125
+ this.traceId = traceId;
965
1126
  this.name = "VmStartTimeoutError";
966
1127
  }
967
1128
  static code = "VM_START_TIMEOUT";
@@ -969,11 +1130,13 @@ class VmStartTimeoutError extends Error {
969
1130
  static description = `VM did not become ready within the specified timeout`;
970
1131
  }
971
1132
  class VmIsSuspendingError extends Error {
972
- constructor(body) {
1133
+ constructor(body, traceId) {
973
1134
  super(
974
- `VM_IS_SUSPENDING: ${body.message}`
1135
+ `VM_IS_SUSPENDING: ${body.message}${traceId ? `
1136
+ TraceId: ${traceId}` : ""}`
975
1137
  );
976
1138
  this.body = body;
1139
+ this.traceId = traceId;
977
1140
  this.name = "VmIsSuspendingError";
978
1141
  }
979
1142
  static code = "VM_IS_SUSPENDING";
@@ -981,11 +1144,13 @@ class VmIsSuspendingError extends Error {
981
1144
  static description = `VM is currently being suspended`;
982
1145
  }
983
1146
  class VmExitDuringStartError extends Error {
984
- constructor(body) {
1147
+ constructor(body, traceId) {
985
1148
  super(
986
- `VM_EXIT_DURING_START: ${body.message}`
1149
+ `VM_EXIT_DURING_START: ${body.message}${traceId ? `
1150
+ TraceId: ${traceId}` : ""}`
987
1151
  );
988
1152
  this.body = body;
1153
+ this.traceId = traceId;
989
1154
  this.name = "VmExitDuringStartError";
990
1155
  }
991
1156
  static code = "VM_EXIT_DURING_START";
@@ -993,11 +1158,13 @@ class VmExitDuringStartError extends Error {
993
1158
  static description = `VM process exited unexpectedly during start`;
994
1159
  }
995
1160
  class VmAccessDeniedError extends Error {
996
- constructor(body) {
1161
+ constructor(body, traceId) {
997
1162
  super(
998
- `VM_ACCESS_DENIED: ${body.message}`
1163
+ `VM_ACCESS_DENIED: ${body.message}${traceId ? `
1164
+ TraceId: ${traceId}` : ""}`
999
1165
  );
1000
1166
  this.body = body;
1167
+ this.traceId = traceId;
1001
1168
  this.name = "VmAccessDeniedError";
1002
1169
  }
1003
1170
  static code = "VM_ACCESS_DENIED";
@@ -1005,11 +1172,13 @@ class VmAccessDeniedError extends Error {
1005
1172
  static description = `You do not have access to this VM`;
1006
1173
  }
1007
1174
  class FailedToSpawnUffdError extends Error {
1008
- constructor(body) {
1175
+ constructor(body, traceId) {
1009
1176
  super(
1010
- `FAILED_TO_SPAWN_UFFD: ${body.message}`
1177
+ `FAILED_TO_SPAWN_UFFD: ${body.message}${traceId ? `
1178
+ TraceId: ${traceId}` : ""}`
1011
1179
  );
1012
1180
  this.body = body;
1181
+ this.traceId = traceId;
1013
1182
  this.name = "FailedToSpawnUffdError";
1014
1183
  }
1015
1184
  static code = "FAILED_TO_SPAWN_UFFD";
@@ -1017,11 +1186,13 @@ class FailedToSpawnUffdError extends Error {
1017
1186
  static description = `Failed to spawn UFFD handler '{daemon_name}'`;
1018
1187
  }
1019
1188
  class VmSpawnProcessError extends Error {
1020
- constructor(body) {
1189
+ constructor(body, traceId) {
1021
1190
  super(
1022
- `VM_SPAWN_PROCESS: ${body.message}`
1191
+ `VM_SPAWN_PROCESS: ${body.message}${traceId ? `
1192
+ TraceId: ${traceId}` : ""}`
1023
1193
  );
1024
1194
  this.body = body;
1195
+ this.traceId = traceId;
1025
1196
  this.name = "VmSpawnProcessError";
1026
1197
  }
1027
1198
  static code = "VM_SPAWN_PROCESS";
@@ -1029,11 +1200,13 @@ class VmSpawnProcessError extends Error {
1029
1200
  static description = `Failed to spawn process for VM`;
1030
1201
  }
1031
1202
  class VmSubnetNotFoundError extends Error {
1032
- constructor(body) {
1203
+ constructor(body, traceId) {
1033
1204
  super(
1034
- `VM_SUBNET_NOT_FOUND: ${body.message}`
1205
+ `VM_SUBNET_NOT_FOUND: ${body.message}${traceId ? `
1206
+ TraceId: ${traceId}` : ""}`
1035
1207
  );
1036
1208
  this.body = body;
1209
+ this.traceId = traceId;
1037
1210
  this.name = "VmSubnetNotFoundError";
1038
1211
  }
1039
1212
  static code = "VM_SUBNET_NOT_FOUND";
@@ -1041,11 +1214,13 @@ class VmSubnetNotFoundError extends Error {
1041
1214
  static description = `Subnet for VM not found`;
1042
1215
  }
1043
1216
  class CreateVmMemNotPowerOfTwoError extends Error {
1044
- constructor(body) {
1217
+ constructor(body, traceId) {
1045
1218
  super(
1046
- `CREATE_VM_MEM_NOT_POWER_OF_TWO: ${body.message}`
1219
+ `CREATE_VM_MEM_NOT_POWER_OF_TWO: ${body.message}${traceId ? `
1220
+ TraceId: ${traceId}` : ""}`
1047
1221
  );
1048
1222
  this.body = body;
1223
+ this.traceId = traceId;
1049
1224
  this.name = "CreateVmMemNotPowerOfTwoError";
1050
1225
  }
1051
1226
  static code = "CREATE_VM_MEM_NOT_POWER_OF_TWO";
@@ -1053,11 +1228,13 @@ class CreateVmMemNotPowerOfTwoError extends Error {
1053
1228
  static description = `memSizeMb must be a power of two in MiB (got {got} MiB)`;
1054
1229
  }
1055
1230
  class CreateVmVcpuNotPowerOfTwoError extends Error {
1056
- constructor(body) {
1231
+ constructor(body, traceId) {
1057
1232
  super(
1058
- `CREATE_VM_VCPU_NOT_POWER_OF_TWO: ${body.message}`
1233
+ `CREATE_VM_VCPU_NOT_POWER_OF_TWO: ${body.message}${traceId ? `
1234
+ TraceId: ${traceId}` : ""}`
1059
1235
  );
1060
1236
  this.body = body;
1237
+ this.traceId = traceId;
1061
1238
  this.name = "CreateVmVcpuNotPowerOfTwoError";
1062
1239
  }
1063
1240
  static code = "CREATE_VM_VCPU_NOT_POWER_OF_TWO";
@@ -1065,11 +1242,13 @@ class CreateVmVcpuNotPowerOfTwoError extends Error {
1065
1242
  static description = `vcpuCount must be a power of two (got {got})`;
1066
1243
  }
1067
1244
  class CreateVmRootfsOutOfRangeError extends Error {
1068
- constructor(body) {
1245
+ constructor(body, traceId) {
1069
1246
  super(
1070
- `CREATE_VM_ROOTFS_OUT_OF_RANGE: ${body.message}`
1247
+ `CREATE_VM_ROOTFS_OUT_OF_RANGE: ${body.message}${traceId ? `
1248
+ TraceId: ${traceId}` : ""}`
1071
1249
  );
1072
1250
  this.body = body;
1251
+ this.traceId = traceId;
1073
1252
  this.name = "CreateVmRootfsOutOfRangeError";
1074
1253
  }
1075
1254
  static code = "CREATE_VM_ROOTFS_OUT_OF_RANGE";
@@ -1077,11 +1256,13 @@ class CreateVmRootfsOutOfRangeError extends Error {
1077
1256
  static description = `rootfsSizeMb out of range (got {got} MB, allowed {min}..={max} MB)`;
1078
1257
  }
1079
1258
  class CreateVmMemOutOfRangeError extends Error {
1080
- constructor(body) {
1259
+ constructor(body, traceId) {
1081
1260
  super(
1082
- `CREATE_VM_MEM_OUT_OF_RANGE: ${body.message}`
1261
+ `CREATE_VM_MEM_OUT_OF_RANGE: ${body.message}${traceId ? `
1262
+ TraceId: ${traceId}` : ""}`
1083
1263
  );
1084
1264
  this.body = body;
1265
+ this.traceId = traceId;
1085
1266
  this.name = "CreateVmMemOutOfRangeError";
1086
1267
  }
1087
1268
  static code = "CREATE_VM_MEM_OUT_OF_RANGE";
@@ -1089,11 +1270,13 @@ class CreateVmMemOutOfRangeError extends Error {
1089
1270
  static description = `memSizeMb out of range (got {got} MiB, allowed {min}..={max} MiB)`;
1090
1271
  }
1091
1272
  class CreateVmVcpuOutOfRangeError extends Error {
1092
- constructor(body) {
1273
+ constructor(body, traceId) {
1093
1274
  super(
1094
- `CREATE_VM_VCPU_OUT_OF_RANGE: ${body.message}`
1275
+ `CREATE_VM_VCPU_OUT_OF_RANGE: ${body.message}${traceId ? `
1276
+ TraceId: ${traceId}` : ""}`
1095
1277
  );
1096
1278
  this.body = body;
1279
+ this.traceId = traceId;
1097
1280
  this.name = "CreateVmVcpuOutOfRangeError";
1098
1281
  }
1099
1282
  static code = "CREATE_VM_VCPU_OUT_OF_RANGE";
@@ -1101,11 +1284,13 @@ class CreateVmVcpuOutOfRangeError extends Error {
1101
1284
  static description = `vcpuCount out of range (got {got}, allowed 1..={max})`;
1102
1285
  }
1103
1286
  class CreateVmBadRequestError extends Error {
1104
- constructor(body) {
1287
+ constructor(body, traceId) {
1105
1288
  super(
1106
- `CREATE_VM_BAD_REQUEST: ${body.message}`
1289
+ `CREATE_VM_BAD_REQUEST: ${body.message}${traceId ? `
1290
+ TraceId: ${traceId}` : ""}`
1107
1291
  );
1108
1292
  this.body = body;
1293
+ this.traceId = traceId;
1109
1294
  this.name = "CreateVmBadRequestError";
1110
1295
  }
1111
1296
  static code = "CREATE_VM_BAD_REQUEST";
@@ -1113,11 +1298,13 @@ class CreateVmBadRequestError extends Error {
1113
1298
  static description = `Bad request: {message}`;
1114
1299
  }
1115
1300
  class VmSetupFailedError extends Error {
1116
- constructor(body) {
1301
+ constructor(body, traceId) {
1117
1302
  super(
1118
- `VM_SETUP_FAILED: ${body.message}`
1303
+ `VM_SETUP_FAILED: ${body.message}${traceId ? `
1304
+ TraceId: ${traceId}` : ""}`
1119
1305
  );
1120
1306
  this.body = body;
1307
+ this.traceId = traceId;
1121
1308
  this.name = "VmSetupFailedError";
1122
1309
  }
1123
1310
  static code = "VM_SETUP_FAILED";
@@ -1125,11 +1312,13 @@ class VmSetupFailedError extends Error {
1125
1312
  static description = `VM setup failed: {failed_reason}`;
1126
1313
  }
1127
1314
  class WantedByEmptyError extends Error {
1128
- constructor(body) {
1315
+ constructor(body, traceId) {
1129
1316
  super(
1130
- `WANTED_BY_EMPTY: ${body.message}`
1317
+ `WANTED_BY_EMPTY: ${body.message}${traceId ? `
1318
+ TraceId: ${traceId}` : ""}`
1131
1319
  );
1132
1320
  this.body = body;
1321
+ this.traceId = traceId;
1133
1322
  this.name = "WantedByEmptyError";
1134
1323
  }
1135
1324
  static code = "WANTED_BY_EMPTY";
@@ -1137,11 +1326,13 @@ class WantedByEmptyError extends Error {
1137
1326
  static description = `wanted_by cannot be empty if provided`;
1138
1327
  }
1139
1328
  class WorkdirEmptyError extends Error {
1140
- constructor(body) {
1329
+ constructor(body, traceId) {
1141
1330
  super(
1142
- `WORKDIR_EMPTY: ${body.message}`
1331
+ `WORKDIR_EMPTY: ${body.message}${traceId ? `
1332
+ TraceId: ${traceId}` : ""}`
1143
1333
  );
1144
1334
  this.body = body;
1335
+ this.traceId = traceId;
1145
1336
  this.name = "WorkdirEmptyError";
1146
1337
  }
1147
1338
  static code = "WORKDIR_EMPTY";
@@ -1149,11 +1340,13 @@ class WorkdirEmptyError extends Error {
1149
1340
  static description = `Working directory cannot be empty if provided`;
1150
1341
  }
1151
1342
  class GroupEmptyError extends Error {
1152
- constructor(body) {
1343
+ constructor(body, traceId) {
1153
1344
  super(
1154
- `GROUP_EMPTY: ${body.message}`
1345
+ `GROUP_EMPTY: ${body.message}${traceId ? `
1346
+ TraceId: ${traceId}` : ""}`
1155
1347
  );
1156
1348
  this.body = body;
1349
+ this.traceId = traceId;
1157
1350
  this.name = "GroupEmptyError";
1158
1351
  }
1159
1352
  static code = "GROUP_EMPTY";
@@ -1161,11 +1354,13 @@ class GroupEmptyError extends Error {
1161
1354
  static description = `Group cannot be empty if provided`;
1162
1355
  }
1163
1356
  class UserEmptyError extends Error {
1164
- constructor(body) {
1357
+ constructor(body, traceId) {
1165
1358
  super(
1166
- `USER_EMPTY: ${body.message}`
1359
+ `USER_EMPTY: ${body.message}${traceId ? `
1360
+ TraceId: ${traceId}` : ""}`
1167
1361
  );
1168
1362
  this.body = body;
1363
+ this.traceId = traceId;
1169
1364
  this.name = "UserEmptyError";
1170
1365
  }
1171
1366
  static code = "USER_EMPTY";
@@ -1173,11 +1368,13 @@ class UserEmptyError extends Error {
1173
1368
  static description = `User cannot be empty if provided`;
1174
1369
  }
1175
1370
  class OnFailureArrayContainsEmptyError extends Error {
1176
- constructor(body) {
1371
+ constructor(body, traceId) {
1177
1372
  super(
1178
- `ON_FAILURE_ARRAY_CONTAINS_EMPTY: ${body.message}`
1373
+ `ON_FAILURE_ARRAY_CONTAINS_EMPTY: ${body.message}${traceId ? `
1374
+ TraceId: ${traceId}` : ""}`
1179
1375
  );
1180
1376
  this.body = body;
1377
+ this.traceId = traceId;
1181
1378
  this.name = "OnFailureArrayContainsEmptyError";
1182
1379
  }
1183
1380
  static code = "ON_FAILURE_ARRAY_CONTAINS_EMPTY";
@@ -1185,11 +1382,13 @@ class OnFailureArrayContainsEmptyError extends Error {
1185
1382
  static description = `'onFailure' array cannot contain empty strings`;
1186
1383
  }
1187
1384
  class RequiresArrayContainsEmptyError extends Error {
1188
- constructor(body) {
1385
+ constructor(body, traceId) {
1189
1386
  super(
1190
- `REQUIRES_ARRAY_CONTAINS_EMPTY: ${body.message}`
1387
+ `REQUIRES_ARRAY_CONTAINS_EMPTY: ${body.message}${traceId ? `
1388
+ TraceId: ${traceId}` : ""}`
1191
1389
  );
1192
1390
  this.body = body;
1391
+ this.traceId = traceId;
1193
1392
  this.name = "RequiresArrayContainsEmptyError";
1194
1393
  }
1195
1394
  static code = "REQUIRES_ARRAY_CONTAINS_EMPTY";
@@ -1197,11 +1396,13 @@ class RequiresArrayContainsEmptyError extends Error {
1197
1396
  static description = `'requires' array cannot contain empty strings`;
1198
1397
  }
1199
1398
  class AfterArrayContainsEmptyError extends Error {
1200
- constructor(body) {
1399
+ constructor(body, traceId) {
1201
1400
  super(
1202
- `AFTER_ARRAY_CONTAINS_EMPTY: ${body.message}`
1401
+ `AFTER_ARRAY_CONTAINS_EMPTY: ${body.message}${traceId ? `
1402
+ TraceId: ${traceId}` : ""}`
1203
1403
  );
1204
1404
  this.body = body;
1405
+ this.traceId = traceId;
1205
1406
  this.name = "AfterArrayContainsEmptyError";
1206
1407
  }
1207
1408
  static code = "AFTER_ARRAY_CONTAINS_EMPTY";
@@ -1209,11 +1410,13 @@ class AfterArrayContainsEmptyError extends Error {
1209
1410
  static description = `'after' array cannot contain empty strings`;
1210
1411
  }
1211
1412
  class EnvKeyContainsEqualsError extends Error {
1212
- constructor(body) {
1413
+ constructor(body, traceId) {
1213
1414
  super(
1214
- `ENV_KEY_CONTAINS_EQUALS: ${body.message}`
1415
+ `ENV_KEY_CONTAINS_EQUALS: ${body.message}${traceId ? `
1416
+ TraceId: ${traceId}` : ""}`
1215
1417
  );
1216
1418
  this.body = body;
1419
+ this.traceId = traceId;
1217
1420
  this.name = "EnvKeyContainsEqualsError";
1218
1421
  }
1219
1422
  static code = "ENV_KEY_CONTAINS_EQUALS";
@@ -1221,11 +1424,13 @@ class EnvKeyContainsEqualsError extends Error {
1221
1424
  static description = `Environment variable key '{key}' cannot contain '='`;
1222
1425
  }
1223
1426
  class EnvKeyEmptyError extends Error {
1224
- constructor(body) {
1427
+ constructor(body, traceId) {
1225
1428
  super(
1226
- `ENV_KEY_EMPTY: ${body.message}`
1429
+ `ENV_KEY_EMPTY: ${body.message}${traceId ? `
1430
+ TraceId: ${traceId}` : ""}`
1227
1431
  );
1228
1432
  this.body = body;
1433
+ this.traceId = traceId;
1229
1434
  this.name = "EnvKeyEmptyError";
1230
1435
  }
1231
1436
  static code = "ENV_KEY_EMPTY";
@@ -1233,11 +1438,13 @@ class EnvKeyEmptyError extends Error {
1233
1438
  static description = `Environment variable key cannot be empty`;
1234
1439
  }
1235
1440
  class ExecEmptyError extends Error {
1236
- constructor(body) {
1441
+ constructor(body, traceId) {
1237
1442
  super(
1238
- `EXEC_EMPTY: ${body.message}`
1443
+ `EXEC_EMPTY: ${body.message}${traceId ? `
1444
+ TraceId: ${traceId}` : ""}`
1239
1445
  );
1240
1446
  this.body = body;
1447
+ this.traceId = traceId;
1241
1448
  this.name = "ExecEmptyError";
1242
1449
  }
1243
1450
  static code = "EXEC_EMPTY";
@@ -1245,11 +1452,13 @@ class ExecEmptyError extends Error {
1245
1452
  static description = `Executable path (exec) cannot be empty`;
1246
1453
  }
1247
1454
  class ServiceNameTooLongError extends Error {
1248
- constructor(body) {
1455
+ constructor(body, traceId) {
1249
1456
  super(
1250
- `SERVICE_NAME_TOO_LONG: ${body.message}`
1457
+ `SERVICE_NAME_TOO_LONG: ${body.message}${traceId ? `
1458
+ TraceId: ${traceId}` : ""}`
1251
1459
  );
1252
1460
  this.body = body;
1461
+ this.traceId = traceId;
1253
1462
  this.name = "ServiceNameTooLongError";
1254
1463
  }
1255
1464
  static code = "SERVICE_NAME_TOO_LONG";
@@ -1257,11 +1466,13 @@ class ServiceNameTooLongError extends Error {
1257
1466
  static description = `Service name '{name}' is too long (max {max_length} characters)`;
1258
1467
  }
1259
1468
  class ServiceNameInvalidPrefixError extends Error {
1260
- constructor(body) {
1469
+ constructor(body, traceId) {
1261
1470
  super(
1262
- `SERVICE_NAME_INVALID_PREFIX: ${body.message}`
1471
+ `SERVICE_NAME_INVALID_PREFIX: ${body.message}${traceId ? `
1472
+ TraceId: ${traceId}` : ""}`
1263
1473
  );
1264
1474
  this.body = body;
1475
+ this.traceId = traceId;
1265
1476
  this.name = "ServiceNameInvalidPrefixError";
1266
1477
  }
1267
1478
  static code = "SERVICE_NAME_INVALID_PREFIX";
@@ -1269,11 +1480,13 @@ class ServiceNameInvalidPrefixError extends Error {
1269
1480
  static description = `Service name '{name}' cannot start with '.' or '-'`;
1270
1481
  }
1271
1482
  class ServiceNameInvalidCharsError extends Error {
1272
- constructor(body) {
1483
+ constructor(body, traceId) {
1273
1484
  super(
1274
- `SERVICE_NAME_INVALID_CHARS: ${body.message}`
1485
+ `SERVICE_NAME_INVALID_CHARS: ${body.message}${traceId ? `
1486
+ TraceId: ${traceId}` : ""}`
1275
1487
  );
1276
1488
  this.body = body;
1489
+ this.traceId = traceId;
1277
1490
  this.name = "ServiceNameInvalidCharsError";
1278
1491
  }
1279
1492
  static code = "SERVICE_NAME_INVALID_CHARS";
@@ -1281,11 +1494,13 @@ class ServiceNameInvalidCharsError extends Error {
1281
1494
  static description = `Service name '{name}' contains invalid characters (/ or null)`;
1282
1495
  }
1283
1496
  class ServiceNameEmptyError extends Error {
1284
- constructor(body) {
1497
+ constructor(body, traceId) {
1285
1498
  super(
1286
- `SERVICE_NAME_EMPTY: ${body.message}`
1499
+ `SERVICE_NAME_EMPTY: ${body.message}${traceId ? `
1500
+ TraceId: ${traceId}` : ""}`
1287
1501
  );
1288
1502
  this.body = body;
1503
+ this.traceId = traceId;
1289
1504
  this.name = "ServiceNameEmptyError";
1290
1505
  }
1291
1506
  static code = "SERVICE_NAME_EMPTY";
@@ -1293,11 +1508,13 @@ class ServiceNameEmptyError extends Error {
1293
1508
  static description = `Service name cannot be empty`;
1294
1509
  }
1295
1510
  class ServiceAlreadyExistsError extends Error {
1296
- constructor(body) {
1511
+ constructor(body, traceId) {
1297
1512
  super(
1298
- `SERVICE_ALREADY_EXISTS: ${body.message}`
1513
+ `SERVICE_ALREADY_EXISTS: ${body.message}${traceId ? `
1514
+ TraceId: ${traceId}` : ""}`
1299
1515
  );
1300
1516
  this.body = body;
1517
+ this.traceId = traceId;
1301
1518
  this.name = "ServiceAlreadyExistsError";
1302
1519
  }
1303
1520
  static code = "SERVICE_ALREADY_EXISTS";
@@ -1305,11 +1522,13 @@ class ServiceAlreadyExistsError extends Error {
1305
1522
  static description = `Service '{service_name}' already exists`;
1306
1523
  }
1307
1524
  class ServiceNotFoundError extends Error {
1308
- constructor(body) {
1525
+ constructor(body, traceId) {
1309
1526
  super(
1310
- `SERVICE_NOT_FOUND: ${body.message}`
1527
+ `SERVICE_NOT_FOUND: ${body.message}${traceId ? `
1528
+ TraceId: ${traceId}` : ""}`
1311
1529
  );
1312
1530
  this.body = body;
1531
+ this.traceId = traceId;
1313
1532
  this.name = "ServiceNotFoundError";
1314
1533
  }
1315
1534
  static code = "SERVICE_NOT_FOUND";
@@ -1317,11 +1536,13 @@ class ServiceNotFoundError extends Error {
1317
1536
  static description = `Service '{service_name}' not found`;
1318
1537
  }
1319
1538
  class InvalidRequestError extends Error {
1320
- constructor(body) {
1539
+ constructor(body, traceId) {
1321
1540
  super(
1322
- `INVALID_REQUEST: ${body.message}`
1541
+ `INVALID_REQUEST: ${body.message}${traceId ? `
1542
+ TraceId: ${traceId}` : ""}`
1323
1543
  );
1324
1544
  this.body = body;
1545
+ this.traceId = traceId;
1325
1546
  this.name = "InvalidRequestError";
1326
1547
  }
1327
1548
  static code = "INVALID_REQUEST";
@@ -1329,11 +1550,13 @@ class InvalidRequestError extends Error {
1329
1550
  static description = `Invalid request: {message}`;
1330
1551
  }
1331
1552
  class RepoNotFoundError extends Error {
1332
- constructor(body) {
1553
+ constructor(body, traceId) {
1333
1554
  super(
1334
- `REPO_NOT_FOUND: ${body.message}`
1555
+ `REPO_NOT_FOUND: ${body.message}${traceId ? `
1556
+ TraceId: ${traceId}` : ""}`
1335
1557
  );
1336
1558
  this.body = body;
1559
+ this.traceId = traceId;
1337
1560
  this.name = "RepoNotFoundError";
1338
1561
  }
1339
1562
  static code = "REPO_NOT_FOUND";
@@ -1341,11 +1564,13 @@ class RepoNotFoundError extends Error {
1341
1564
  static description = `Repository not found: {repo_id}`;
1342
1565
  }
1343
1566
  class RuntimeErrorError extends Error {
1344
- constructor(body) {
1567
+ constructor(body, traceId) {
1345
1568
  super(
1346
- `RUNTIME_ERROR: ${body.message}`
1569
+ `RUNTIME_ERROR: ${body.message}${traceId ? `
1570
+ TraceId: ${traceId}` : ""}`
1347
1571
  );
1348
1572
  this.body = body;
1573
+ this.traceId = traceId;
1349
1574
  this.name = "RuntimeErrorError";
1350
1575
  }
1351
1576
  static code = "RUNTIME_ERROR";
@@ -1353,11 +1578,13 @@ class RuntimeErrorError extends Error {
1353
1578
  static description = `The script execution resulted in a runtime error: {message}`;
1354
1579
  }
1355
1580
  class SyntaxErrorError extends Error {
1356
- constructor(body) {
1581
+ constructor(body, traceId) {
1357
1582
  super(
1358
- `SYNTAX_ERROR: ${body.message}`
1583
+ `SYNTAX_ERROR: ${body.message}${traceId ? `
1584
+ TraceId: ${traceId}` : ""}`
1359
1585
  );
1360
1586
  this.body = body;
1587
+ this.traceId = traceId;
1361
1588
  this.name = "SyntaxErrorError";
1362
1589
  }
1363
1590
  static code = "SYNTAX_ERROR";
@@ -1365,11 +1592,13 @@ class SyntaxErrorError extends Error {
1365
1592
  static description = `The provided script has a syntax error: {message}`;
1366
1593
  }
1367
1594
  class InternalError extends Error {
1368
- constructor(body) {
1595
+ constructor(body, traceId) {
1369
1596
  super(
1370
- `INTERNAL: ${body.message}`
1597
+ `INTERNAL: ${body.message}${traceId ? `
1598
+ TraceId: ${traceId}` : ""}`
1371
1599
  );
1372
1600
  this.body = body;
1601
+ this.traceId = traceId;
1373
1602
  this.name = "InternalError";
1374
1603
  }
1375
1604
  static code = "INTERNAL";
@@ -1377,11 +1606,13 @@ class InternalError extends Error {
1377
1606
  static description = `Internal error: {0}`;
1378
1607
  }
1379
1608
  class SigningError extends Error {
1380
- constructor(body) {
1609
+ constructor(body, traceId) {
1381
1610
  super(
1382
- `SIGNING: ${body.message}`
1611
+ `SIGNING: ${body.message}${traceId ? `
1612
+ TraceId: ${traceId}` : ""}`
1383
1613
  );
1384
1614
  this.body = body;
1615
+ this.traceId = traceId;
1385
1616
  this.name = "SigningError";
1386
1617
  }
1387
1618
  static code = "SIGNING";
@@ -1389,11 +1620,13 @@ class SigningError extends Error {
1389
1620
  static description = `Signing error`;
1390
1621
  }
1391
1622
  class InvalidSignatureError extends Error {
1392
- constructor(body) {
1623
+ constructor(body, traceId) {
1393
1624
  super(
1394
- `INVALID_SIGNATURE: ${body.message}`
1625
+ `INVALID_SIGNATURE: ${body.message}${traceId ? `
1626
+ TraceId: ${traceId}` : ""}`
1395
1627
  );
1396
1628
  this.body = body;
1629
+ this.traceId = traceId;
1397
1630
  this.name = "InvalidSignatureError";
1398
1631
  }
1399
1632
  static code = "INVALID_SIGNATURE";
@@ -1401,11 +1634,13 @@ class InvalidSignatureError extends Error {
1401
1634
  static description = `Invalid signature`;
1402
1635
  }
1403
1636
  class InvalidParametersError extends Error {
1404
- constructor(body) {
1637
+ constructor(body, traceId) {
1405
1638
  super(
1406
- `INVALID_PARAMETERS: ${body.message}`
1639
+ `INVALID_PARAMETERS: ${body.message}${traceId ? `
1640
+ TraceId: ${traceId}` : ""}`
1407
1641
  );
1408
1642
  this.body = body;
1643
+ this.traceId = traceId;
1409
1644
  this.name = "InvalidParametersError";
1410
1645
  }
1411
1646
  static code = "INVALID_PARAMETERS";
@@ -1413,11 +1648,13 @@ class InvalidParametersError extends Error {
1413
1648
  static description = `Invalid parameters`;
1414
1649
  }
1415
1650
  class MaxUsesExceededError extends Error {
1416
- constructor(body) {
1651
+ constructor(body, traceId) {
1417
1652
  super(
1418
- `MAX_USES_EXCEEDED: ${body.message}`
1653
+ `MAX_USES_EXCEEDED: ${body.message}${traceId ? `
1654
+ TraceId: ${traceId}` : ""}`
1419
1655
  );
1420
1656
  this.body = body;
1657
+ this.traceId = traceId;
1421
1658
  this.name = "MaxUsesExceededError";
1422
1659
  }
1423
1660
  static code = "MAX_USES_EXCEEDED";
@@ -1425,11 +1662,13 @@ class MaxUsesExceededError extends Error {
1425
1662
  static description = `Session maximum uses exceeded`;
1426
1663
  }
1427
1664
  class ExpiredError extends Error {
1428
- constructor(body) {
1665
+ constructor(body, traceId) {
1429
1666
  super(
1430
- `EXPIRED: ${body.message}`
1667
+ `EXPIRED: ${body.message}${traceId ? `
1668
+ TraceId: ${traceId}` : ""}`
1431
1669
  );
1432
1670
  this.body = body;
1671
+ this.traceId = traceId;
1433
1672
  this.name = "ExpiredError";
1434
1673
  }
1435
1674
  static code = "EXPIRED";
@@ -1437,11 +1676,13 @@ class ExpiredError extends Error {
1437
1676
  static description = `Session has expired`;
1438
1677
  }
1439
1678
  class NotFoundError extends Error {
1440
- constructor(body) {
1679
+ constructor(body, traceId) {
1441
1680
  super(
1442
- `NOT_FOUND: ${body.message}`
1681
+ `NOT_FOUND: ${body.message}${traceId ? `
1682
+ TraceId: ${traceId}` : ""}`
1443
1683
  );
1444
1684
  this.body = body;
1685
+ this.traceId = traceId;
1445
1686
  this.name = "NotFoundError";
1446
1687
  }
1447
1688
  static code = "NOT_FOUND";
@@ -1449,11 +1690,13 @@ class NotFoundError extends Error {
1449
1690
  static description = `Repository not found`;
1450
1691
  }
1451
1692
  class TreeNotFoundError extends Error {
1452
- constructor(body) {
1693
+ constructor(body, traceId) {
1453
1694
  super(
1454
- `TREE_NOT_FOUND: ${body.message}`
1695
+ `TREE_NOT_FOUND: ${body.message}${traceId ? `
1696
+ TraceId: ${traceId}` : ""}`
1455
1697
  );
1456
1698
  this.body = body;
1699
+ this.traceId = traceId;
1457
1700
  this.name = "TreeNotFoundError";
1458
1701
  }
1459
1702
  static code = "TREE_NOT_FOUND";
@@ -1461,11 +1704,13 @@ class TreeNotFoundError extends Error {
1461
1704
  static description = `Tree not found: {hash}`;
1462
1705
  }
1463
1706
  class BranchNotFoundError extends Error {
1464
- constructor(body) {
1707
+ constructor(body, traceId) {
1465
1708
  super(
1466
- `BRANCH_NOT_FOUND: ${body.message}`
1709
+ `BRANCH_NOT_FOUND: ${body.message}${traceId ? `
1710
+ TraceId: ${traceId}` : ""}`
1467
1711
  );
1468
1712
  this.body = body;
1713
+ this.traceId = traceId;
1469
1714
  this.name = "BranchNotFoundError";
1470
1715
  }
1471
1716
  static code = "BRANCH_NOT_FOUND";
@@ -1473,11 +1718,13 @@ class BranchNotFoundError extends Error {
1473
1718
  static description = `Branch not found: {branch}`;
1474
1719
  }
1475
1720
  class CommitNotFoundError extends Error {
1476
- constructor(body) {
1721
+ constructor(body, traceId) {
1477
1722
  super(
1478
- `COMMIT_NOT_FOUND: ${body.message}`
1723
+ `COMMIT_NOT_FOUND: ${body.message}${traceId ? `
1724
+ TraceId: ${traceId}` : ""}`
1479
1725
  );
1480
1726
  this.body = body;
1727
+ this.traceId = traceId;
1481
1728
  this.name = "CommitNotFoundError";
1482
1729
  }
1483
1730
  static code = "COMMIT_NOT_FOUND";
@@ -1485,11 +1732,13 @@ class CommitNotFoundError extends Error {
1485
1732
  static description = `Commit not found: {hash}`;
1486
1733
  }
1487
1734
  class ParentNotFoundError extends Error {
1488
- constructor(body) {
1735
+ constructor(body, traceId) {
1489
1736
  super(
1490
- `PARENT_NOT_FOUND: ${body.message}`
1737
+ `PARENT_NOT_FOUND: ${body.message}${traceId ? `
1738
+ TraceId: ${traceId}` : ""}`
1491
1739
  );
1492
1740
  this.body = body;
1741
+ this.traceId = traceId;
1493
1742
  this.name = "ParentNotFoundError";
1494
1743
  }
1495
1744
  static code = "PARENT_NOT_FOUND";
@@ -1497,11 +1746,13 @@ class ParentNotFoundError extends Error {
1497
1746
  static description = `Parent commit not found: {sha}`;
1498
1747
  }
1499
1748
  class NoDefaultBranchError extends Error {
1500
- constructor(body) {
1749
+ constructor(body, traceId) {
1501
1750
  super(
1502
- `NO_DEFAULT_BRANCH: ${body.message}`
1751
+ `NO_DEFAULT_BRANCH: ${body.message}${traceId ? `
1752
+ TraceId: ${traceId}` : ""}`
1503
1753
  );
1504
1754
  this.body = body;
1755
+ this.traceId = traceId;
1505
1756
  this.name = "NoDefaultBranchError";
1506
1757
  }
1507
1758
  static code = "NO_DEFAULT_BRANCH";
@@ -1509,11 +1760,13 @@ class NoDefaultBranchError extends Error {
1509
1760
  static description = `Repository has no default branch configured`;
1510
1761
  }
1511
1762
  class InvalidBase64ContentError extends Error {
1512
- constructor(body) {
1763
+ constructor(body, traceId) {
1513
1764
  super(
1514
- `INVALID_BASE64_CONTENT: ${body.message}`
1765
+ `INVALID_BASE64_CONTENT: ${body.message}${traceId ? `
1766
+ TraceId: ${traceId}` : ""}`
1515
1767
  );
1516
1768
  this.body = body;
1769
+ this.traceId = traceId;
1517
1770
  this.name = "InvalidBase64ContentError";
1518
1771
  }
1519
1772
  static code = "INVALID_BASE64_CONTENT";
@@ -1521,11 +1774,13 @@ class InvalidBase64ContentError extends Error {
1521
1774
  static description = `Invalid base64 content for file: {path}`;
1522
1775
  }
1523
1776
  class InvalidFileChangeError extends Error {
1524
- constructor(body) {
1777
+ constructor(body, traceId) {
1525
1778
  super(
1526
- `INVALID_FILE_CHANGE: ${body.message}`
1779
+ `INVALID_FILE_CHANGE: ${body.message}${traceId ? `
1780
+ TraceId: ${traceId}` : ""}`
1527
1781
  );
1528
1782
  this.body = body;
1783
+ this.traceId = traceId;
1529
1784
  this.name = "InvalidFileChangeError";
1530
1785
  }
1531
1786
  static code = "INVALID_FILE_CHANGE";
@@ -1533,11 +1788,13 @@ class InvalidFileChangeError extends Error {
1533
1788
  static description = `File change must have either content or deleted flag, not both: {path}`;
1534
1789
  }
1535
1790
  class InvalidFilePathError extends Error {
1536
- constructor(body) {
1791
+ constructor(body, traceId) {
1537
1792
  super(
1538
- `INVALID_FILE_PATH: ${body.message}`
1793
+ `INVALID_FILE_PATH: ${body.message}${traceId ? `
1794
+ TraceId: ${traceId}` : ""}`
1539
1795
  );
1540
1796
  this.body = body;
1797
+ this.traceId = traceId;
1541
1798
  this.name = "InvalidFilePathError";
1542
1799
  }
1543
1800
  static code = "INVALID_FILE_PATH";
@@ -1545,11 +1802,13 @@ class InvalidFilePathError extends Error {
1545
1802
  static description = `Invalid file path: {path}`;
1546
1803
  }
1547
1804
  class ConflictingParentError extends Error {
1548
- constructor(body) {
1805
+ constructor(body, traceId) {
1549
1806
  super(
1550
- `CONFLICTING_PARENT: ${body.message}`
1807
+ `CONFLICTING_PARENT: ${body.message}${traceId ? `
1808
+ TraceId: ${traceId}` : ""}`
1551
1809
  );
1552
1810
  this.body = body;
1811
+ this.traceId = traceId;
1553
1812
  this.name = "ConflictingParentError";
1554
1813
  }
1555
1814
  static code = "CONFLICTING_PARENT";
@@ -1557,11 +1816,13 @@ class ConflictingParentError extends Error {
1557
1816
  static description = `Conflict: expected parent SHA {expected} but current is {actual:?}`;
1558
1817
  }
1559
1818
  class AmbiguousError extends Error {
1560
- constructor(body) {
1819
+ constructor(body, traceId) {
1561
1820
  super(
1562
- `AMBIGUOUS: ${body.message}`
1821
+ `AMBIGUOUS: ${body.message}${traceId ? `
1822
+ TraceId: ${traceId}` : ""}`
1563
1823
  );
1564
1824
  this.body = body;
1825
+ this.traceId = traceId;
1565
1826
  this.name = "AmbiguousError";
1566
1827
  }
1567
1828
  static code = "AMBIGUOUS";
@@ -1569,11 +1830,13 @@ class AmbiguousError extends Error {
1569
1830
  static description = `rev is ambiguous: {rev}`;
1570
1831
  }
1571
1832
  class InvalidError extends Error {
1572
- constructor(body) {
1833
+ constructor(body, traceId) {
1573
1834
  super(
1574
- `INVALID: ${body.message}`
1835
+ `INVALID: ${body.message}${traceId ? `
1836
+ TraceId: ${traceId}` : ""}`
1575
1837
  );
1576
1838
  this.body = body;
1839
+ this.traceId = traceId;
1577
1840
  this.name = "InvalidError";
1578
1841
  }
1579
1842
  static code = "INVALID";
@@ -1581,11 +1844,13 @@ class InvalidError extends Error {
1581
1844
  static description = `invalid rev syntax: {rev}`;
1582
1845
  }
1583
1846
  class ConflictError extends Error {
1584
- constructor(body) {
1847
+ constructor(body, traceId) {
1585
1848
  super(
1586
- `CONFLICT: ${body.message}`
1849
+ `CONFLICT: ${body.message}${traceId ? `
1850
+ TraceId: ${traceId}` : ""}`
1587
1851
  );
1588
1852
  this.body = body;
1853
+ this.traceId = traceId;
1589
1854
  this.name = "ConflictError";
1590
1855
  }
1591
1856
  static code = "CONFLICT";
@@ -1593,11 +1858,13 @@ class ConflictError extends Error {
1593
1858
  static description = `Sync conflict: {message}`;
1594
1859
  }
1595
1860
  class BranchAlreadyExistsError extends Error {
1596
- constructor(body) {
1861
+ constructor(body, traceId) {
1597
1862
  super(
1598
- `BRANCH_ALREADY_EXISTS: ${body.message}`
1863
+ `BRANCH_ALREADY_EXISTS: ${body.message}${traceId ? `
1864
+ TraceId: ${traceId}` : ""}`
1599
1865
  );
1600
1866
  this.body = body;
1867
+ this.traceId = traceId;
1601
1868
  this.name = "BranchAlreadyExistsError";
1602
1869
  }
1603
1870
  static code = "BRANCH_ALREADY_EXISTS";
@@ -1605,11 +1872,13 @@ class BranchAlreadyExistsError extends Error {
1605
1872
  static description = `Branch already exists: {branch}`;
1606
1873
  }
1607
1874
  class PathNotFoundError extends Error {
1608
- constructor(body) {
1875
+ constructor(body, traceId) {
1609
1876
  super(
1610
- `PATH_NOT_FOUND: ${body.message}`
1877
+ `PATH_NOT_FOUND: ${body.message}${traceId ? `
1878
+ TraceId: ${traceId}` : ""}`
1611
1879
  );
1612
1880
  this.body = body;
1881
+ this.traceId = traceId;
1613
1882
  this.name = "PathNotFoundError";
1614
1883
  }
1615
1884
  static code = "PATH_NOT_FOUND";
@@ -1617,11 +1886,13 @@ class PathNotFoundError extends Error {
1617
1886
  static description = `Path not found: {path}`;
1618
1887
  }
1619
1888
  class ReferenceNotFoundError extends Error {
1620
- constructor(body) {
1889
+ constructor(body, traceId) {
1621
1890
  super(
1622
- `REFERENCE_NOT_FOUND: ${body.message}`
1891
+ `REFERENCE_NOT_FOUND: ${body.message}${traceId ? `
1892
+ TraceId: ${traceId}` : ""}`
1623
1893
  );
1624
1894
  this.body = body;
1895
+ this.traceId = traceId;
1625
1896
  this.name = "ReferenceNotFoundError";
1626
1897
  }
1627
1898
  static code = "REFERENCE_NOT_FOUND";
@@ -1629,11 +1900,13 @@ class ReferenceNotFoundError extends Error {
1629
1900
  static description = `Reference not found: {reference}`;
1630
1901
  }
1631
1902
  class InvalidServiceError extends Error {
1632
- constructor(body) {
1903
+ constructor(body, traceId) {
1633
1904
  super(
1634
- `INVALID_SERVICE: ${body.message}`
1905
+ `INVALID_SERVICE: ${body.message}${traceId ? `
1906
+ TraceId: ${traceId}` : ""}`
1635
1907
  );
1636
1908
  this.body = body;
1909
+ this.traceId = traceId;
1637
1910
  this.name = "InvalidServiceError";
1638
1911
  }
1639
1912
  static code = "INVALID_SERVICE";
@@ -1641,11 +1914,13 @@ class InvalidServiceError extends Error {
1641
1914
  static description = `Invalid service '{invalid}', expected 'git-upload-pack' or 'git-receive-pack'`;
1642
1915
  }
1643
1916
  class ExpectedServiceError extends Error {
1644
- constructor(body) {
1917
+ constructor(body, traceId) {
1645
1918
  super(
1646
- `EXPECTED_SERVICE: ${body.message}`
1919
+ `EXPECTED_SERVICE: ${body.message}${traceId ? `
1920
+ TraceId: ${traceId}` : ""}`
1647
1921
  );
1648
1922
  this.body = body;
1923
+ this.traceId = traceId;
1649
1924
  this.name = "ExpectedServiceError";
1650
1925
  }
1651
1926
  static code = "EXPECTED_SERVICE";
@@ -1653,11 +1928,13 @@ class ExpectedServiceError extends Error {
1653
1928
  static description = `Expected 'service' query parameter`;
1654
1929
  }
1655
1930
  class UnauthorizedError extends Error {
1656
- constructor(body) {
1931
+ constructor(body, traceId) {
1657
1932
  super(
1658
- `UNAUTHORIZED: ${body.message}`
1933
+ `UNAUTHORIZED: ${body.message}${traceId ? `
1934
+ TraceId: ${traceId}` : ""}`
1659
1935
  );
1660
1936
  this.body = body;
1937
+ this.traceId = traceId;
1661
1938
  this.name = "UnauthorizedError";
1662
1939
  }
1663
1940
  static code = "UNAUTHORIZED";
@@ -1665,11 +1942,13 @@ class UnauthorizedError extends Error {
1665
1942
  static description = `Unauthorized: admin key and account id are required`;
1666
1943
  }
1667
1944
  class ForbiddenError extends Error {
1668
- constructor(body) {
1945
+ constructor(body, traceId) {
1669
1946
  super(
1670
- `FORBIDDEN: ${body.message}`
1947
+ `FORBIDDEN: ${body.message}${traceId ? `
1948
+ TraceId: ${traceId}` : ""}`
1671
1949
  );
1672
1950
  this.body = body;
1951
+ this.traceId = traceId;
1673
1952
  this.name = "ForbiddenError";
1674
1953
  }
1675
1954
  static code = "FORBIDDEN";
@@ -1677,11 +1956,13 @@ class ForbiddenError extends Error {
1677
1956
  static description = `Forbidden`;
1678
1957
  }
1679
1958
  class InvalidAccountIdError extends Error {
1680
- constructor(body) {
1959
+ constructor(body, traceId) {
1681
1960
  super(
1682
- `INVALID_ACCOUNT_ID: ${body.message}`
1961
+ `INVALID_ACCOUNT_ID: ${body.message}${traceId ? `
1962
+ TraceId: ${traceId}` : ""}`
1683
1963
  );
1684
1964
  this.body = body;
1965
+ this.traceId = traceId;
1685
1966
  this.name = "InvalidAccountIdError";
1686
1967
  }
1687
1968
  static code = "INVALID_ACCOUNT_ID";
@@ -1689,11 +1970,13 @@ class InvalidAccountIdError extends Error {
1689
1970
  static description = `Invalid account ID: {account_id}`;
1690
1971
  }
1691
1972
  class SourceImportConflictError extends Error {
1692
- constructor(body) {
1973
+ constructor(body, traceId) {
1693
1974
  super(
1694
- `SOURCE_IMPORT_CONFLICT: ${body.message}`
1975
+ `SOURCE_IMPORT_CONFLICT: ${body.message}${traceId ? `
1976
+ TraceId: ${traceId}` : ""}`
1695
1977
  );
1696
1978
  this.body = body;
1979
+ this.traceId = traceId;
1697
1980
  this.name = "SourceImportConflictError";
1698
1981
  }
1699
1982
  static code = "SOURCE_IMPORT_CONFLICT";
@@ -1701,11 +1984,13 @@ class SourceImportConflictError extends Error {
1701
1984
  static description = `Source and import are mutually exclusive`;
1702
1985
  }
1703
1986
  class SourceUnauthorizedError extends Error {
1704
- constructor(body) {
1987
+ constructor(body, traceId) {
1705
1988
  super(
1706
- `SOURCE_UNAUTHORIZED: ${body.message}`
1989
+ `SOURCE_UNAUTHORIZED: ${body.message}${traceId ? `
1990
+ TraceId: ${traceId}` : ""}`
1707
1991
  );
1708
1992
  this.body = body;
1993
+ this.traceId = traceId;
1709
1994
  this.name = "SourceUnauthorizedError";
1710
1995
  }
1711
1996
  static code = "SOURCE_UNAUTHORIZED";
@@ -1713,11 +1998,13 @@ class SourceUnauthorizedError extends Error {
1713
1998
  static description = `Unauthorized to access source repository at {url}`;
1714
1999
  }
1715
2000
  class SourceNotFoundError extends Error {
1716
- constructor(body) {
2001
+ constructor(body, traceId) {
1717
2002
  super(
1718
- `SOURCE_NOT_FOUND: ${body.message}`
2003
+ `SOURCE_NOT_FOUND: ${body.message}${traceId ? `
2004
+ TraceId: ${traceId}` : ""}`
1719
2005
  );
1720
2006
  this.body = body;
2007
+ this.traceId = traceId;
1721
2008
  this.name = "SourceNotFoundError";
1722
2009
  }
1723
2010
  static code = "SOURCE_NOT_FOUND";
@@ -1725,11 +2012,13 @@ class SourceNotFoundError extends Error {
1725
2012
  static description = `Source repository not found at {url}`;
1726
2013
  }
1727
2014
  class ImportSubdirNotFoundError extends Error {
1728
- constructor(body) {
2015
+ constructor(body, traceId) {
1729
2016
  super(
1730
- `IMPORT_SUBDIR_NOT_FOUND: ${body.message}`
2017
+ `IMPORT_SUBDIR_NOT_FOUND: ${body.message}${traceId ? `
2018
+ TraceId: ${traceId}` : ""}`
1731
2019
  );
1732
2020
  this.body = body;
2021
+ this.traceId = traceId;
1733
2022
  this.name = "ImportSubdirNotFoundError";
1734
2023
  }
1735
2024
  static code = "IMPORT_SUBDIR_NOT_FOUND";
@@ -1737,11 +2026,13 @@ class ImportSubdirNotFoundError extends Error {
1737
2026
  static description = `Directory not found in {source}: {dir}`;
1738
2027
  }
1739
2028
  class RepoAlreadyExistsError extends Error {
1740
- constructor(body) {
2029
+ constructor(body, traceId) {
1741
2030
  super(
1742
- `REPO_ALREADY_EXISTS: ${body.message}`
2031
+ `REPO_ALREADY_EXISTS: ${body.message}${traceId ? `
2032
+ TraceId: ${traceId}` : ""}`
1743
2033
  );
1744
2034
  this.body = body;
2035
+ this.traceId = traceId;
1745
2036
  this.name = "RepoAlreadyExistsError";
1746
2037
  }
1747
2038
  static code = "REPO_ALREADY_EXISTS";
@@ -1749,11 +2040,13 @@ class RepoAlreadyExistsError extends Error {
1749
2040
  static description = `Repo '{repo_id}' already exists`;
1750
2041
  }
1751
2042
  class TagNotFoundError extends Error {
1752
- constructor(body) {
2043
+ constructor(body, traceId) {
1753
2044
  super(
1754
- `TAG_NOT_FOUND: ${body.message}`
2045
+ `TAG_NOT_FOUND: ${body.message}${traceId ? `
2046
+ TraceId: ${traceId}` : ""}`
1755
2047
  );
1756
2048
  this.body = body;
2049
+ this.traceId = traceId;
1757
2050
  this.name = "TagNotFoundError";
1758
2051
  }
1759
2052
  static code = "TAG_NOT_FOUND";
@@ -1761,11 +2054,13 @@ class TagNotFoundError extends Error {
1761
2054
  static description = `Tag not found: {hash}`;
1762
2055
  }
1763
2056
  class InvalidRevisionError extends Error {
1764
- constructor(body) {
2057
+ constructor(body, traceId) {
1765
2058
  super(
1766
- `INVALID_REVISION: ${body.message}`
2059
+ `INVALID_REVISION: ${body.message}${traceId ? `
2060
+ TraceId: ${traceId}` : ""}`
1767
2061
  );
1768
2062
  this.body = body;
2063
+ this.traceId = traceId;
1769
2064
  this.name = "InvalidRevisionError";
1770
2065
  }
1771
2066
  static code = "INVALID_REVISION";
@@ -1773,11 +2068,13 @@ class InvalidRevisionError extends Error {
1773
2068
  static description = `Invalid revision: {revision}`;
1774
2069
  }
1775
2070
  class BlobNotFoundError extends Error {
1776
- constructor(body) {
2071
+ constructor(body, traceId) {
1777
2072
  super(
1778
- `BLOB_NOT_FOUND: ${body.message}`
2073
+ `BLOB_NOT_FOUND: ${body.message}${traceId ? `
2074
+ TraceId: ${traceId}` : ""}`
1779
2075
  );
1780
2076
  this.body = body;
2077
+ this.traceId = traceId;
1781
2078
  this.name = "BlobNotFoundError";
1782
2079
  }
1783
2080
  static code = "BLOB_NOT_FOUND";
@@ -1785,11 +2082,13 @@ class BlobNotFoundError extends Error {
1785
2082
  static description = `Blob not found: {hash}`;
1786
2083
  }
1787
2084
  class SendErrorError extends Error {
1788
- constructor(body) {
2085
+ constructor(body, traceId) {
1789
2086
  super(
1790
- `SEND_ERROR: ${body.message}`
2087
+ `SEND_ERROR: ${body.message}${traceId ? `
2088
+ TraceId: ${traceId}` : ""}`
1791
2089
  );
1792
2090
  this.body = body;
2091
+ this.traceId = traceId;
1793
2092
  this.name = "SendErrorError";
1794
2093
  }
1795
2094
  static code = "SEND_ERROR";
@@ -1797,11 +2096,13 @@ class SendErrorError extends Error {
1797
2096
  static description = `Stream receiver dropped`;
1798
2097
  }
1799
2098
  class UnsupportedTransferError extends Error {
1800
- constructor(body) {
2099
+ constructor(body, traceId) {
1801
2100
  super(
1802
- `UNSUPPORTED_TRANSFER: ${body.message}`
2101
+ `UNSUPPORTED_TRANSFER: ${body.message}${traceId ? `
2102
+ TraceId: ${traceId}` : ""}`
1803
2103
  );
1804
2104
  this.body = body;
2105
+ this.traceId = traceId;
1805
2106
  this.name = "UnsupportedTransferError";
1806
2107
  }
1807
2108
  static code = "UNSUPPORTED_TRANSFER";
@@ -1809,11 +2110,13 @@ class UnsupportedTransferError extends Error {
1809
2110
  static description = `Unsupported LFS transfer protocol(s)`;
1810
2111
  }
1811
2112
  class DiffInvalidPathPatternError extends Error {
1812
- constructor(body) {
2113
+ constructor(body, traceId) {
1813
2114
  super(
1814
- `DIFF_INVALID_PATH_PATTERN: ${body.message}`
2115
+ `DIFF_INVALID_PATH_PATTERN: ${body.message}${traceId ? `
2116
+ TraceId: ${traceId}` : ""}`
1815
2117
  );
1816
2118
  this.body = body;
2119
+ this.traceId = traceId;
1817
2120
  this.name = "DiffInvalidPathPatternError";
1818
2121
  }
1819
2122
  static code = "DIFF_INVALID_PATH_PATTERN";
@@ -1821,11 +2124,13 @@ class DiffInvalidPathPatternError extends Error {
1821
2124
  static description = `Invalid path pattern: {reason}`;
1822
2125
  }
1823
2126
  class DiffInvalidRegexError extends Error {
1824
- constructor(body) {
2127
+ constructor(body, traceId) {
1825
2128
  super(
1826
- `DIFF_INVALID_REGEX: ${body.message}`
2129
+ `DIFF_INVALID_REGEX: ${body.message}${traceId ? `
2130
+ TraceId: ${traceId}` : ""}`
1827
2131
  );
1828
2132
  this.body = body;
2133
+ this.traceId = traceId;
1829
2134
  this.name = "DiffInvalidRegexError";
1830
2135
  }
1831
2136
  static code = "DIFF_INVALID_REGEX";
@@ -1833,11 +2138,13 @@ class DiffInvalidRegexError extends Error {
1833
2138
  static description = `Invalid regex pattern: {reason}`;
1834
2139
  }
1835
2140
  class DiffEmptyQueryError extends Error {
1836
- constructor(body) {
2141
+ constructor(body, traceId) {
1837
2142
  super(
1838
- `DIFF_EMPTY_QUERY: ${body.message}`
2143
+ `DIFF_EMPTY_QUERY: ${body.message}${traceId ? `
2144
+ TraceId: ${traceId}` : ""}`
1839
2145
  );
1840
2146
  this.body = body;
2147
+ this.traceId = traceId;
1841
2148
  this.name = "DiffEmptyQueryError";
1842
2149
  }
1843
2150
  static code = "DIFF_EMPTY_QUERY";
@@ -1845,11 +2152,13 @@ class DiffEmptyQueryError extends Error {
1845
2152
  static description = `Query must not be empty`;
1846
2153
  }
1847
2154
  class CommitInvalidRegexError extends Error {
1848
- constructor(body) {
2155
+ constructor(body, traceId) {
1849
2156
  super(
1850
- `COMMIT_INVALID_REGEX: ${body.message}`
2157
+ `COMMIT_INVALID_REGEX: ${body.message}${traceId ? `
2158
+ TraceId: ${traceId}` : ""}`
1851
2159
  );
1852
2160
  this.body = body;
2161
+ this.traceId = traceId;
1853
2162
  this.name = "CommitInvalidRegexError";
1854
2163
  }
1855
2164
  static code = "COMMIT_INVALID_REGEX";
@@ -1857,11 +2166,13 @@ class CommitInvalidRegexError extends Error {
1857
2166
  static description = `Invalid regex pattern: {reason}`;
1858
2167
  }
1859
2168
  class CommitEmptyQueryError extends Error {
1860
- constructor(body) {
2169
+ constructor(body, traceId) {
1861
2170
  super(
1862
- `COMMIT_EMPTY_QUERY: ${body.message}`
2171
+ `COMMIT_EMPTY_QUERY: ${body.message}${traceId ? `
2172
+ TraceId: ${traceId}` : ""}`
1863
2173
  );
1864
2174
  this.body = body;
2175
+ this.traceId = traceId;
1865
2176
  this.name = "CommitEmptyQueryError";
1866
2177
  }
1867
2178
  static code = "COMMIT_EMPTY_QUERY";
@@ -1869,11 +2180,13 @@ class CommitEmptyQueryError extends Error {
1869
2180
  static description = `Query must not be empty`;
1870
2181
  }
1871
2182
  class FilenameInvalidPatternError extends Error {
1872
- constructor(body) {
2183
+ constructor(body, traceId) {
1873
2184
  super(
1874
- `FILENAME_INVALID_PATTERN: ${body.message}`
2185
+ `FILENAME_INVALID_PATTERN: ${body.message}${traceId ? `
2186
+ TraceId: ${traceId}` : ""}`
1875
2187
  );
1876
2188
  this.body = body;
2189
+ this.traceId = traceId;
1877
2190
  this.name = "FilenameInvalidPatternError";
1878
2191
  }
1879
2192
  static code = "FILENAME_INVALID_PATTERN";
@@ -1881,11 +2194,13 @@ class FilenameInvalidPatternError extends Error {
1881
2194
  static description = `Invalid pattern: {reason}`;
1882
2195
  }
1883
2196
  class FilenameEmptyQueryError extends Error {
1884
- constructor(body) {
2197
+ constructor(body, traceId) {
1885
2198
  super(
1886
- `FILENAME_EMPTY_QUERY: ${body.message}`
2199
+ `FILENAME_EMPTY_QUERY: ${body.message}${traceId ? `
2200
+ TraceId: ${traceId}` : ""}`
1887
2201
  );
1888
2202
  this.body = body;
2203
+ this.traceId = traceId;
1889
2204
  this.name = "FilenameEmptyQueryError";
1890
2205
  }
1891
2206
  static code = "FILENAME_EMPTY_QUERY";
@@ -1893,11 +2208,13 @@ class FilenameEmptyQueryError extends Error {
1893
2208
  static description = `Query must not be empty`;
1894
2209
  }
1895
2210
  class InvalidRegexError extends Error {
1896
- constructor(body) {
2211
+ constructor(body, traceId) {
1897
2212
  super(
1898
- `INVALID_REGEX: ${body.message}`
2213
+ `INVALID_REGEX: ${body.message}${traceId ? `
2214
+ TraceId: ${traceId}` : ""}`
1899
2215
  );
1900
2216
  this.body = body;
2217
+ this.traceId = traceId;
1901
2218
  this.name = "InvalidRegexError";
1902
2219
  }
1903
2220
  static code = "INVALID_REGEX";
@@ -1905,11 +2222,13 @@ class InvalidRegexError extends Error {
1905
2222
  static description = `Invalid regex pattern: {reason}`;
1906
2223
  }
1907
2224
  class InvalidPathPatternError extends Error {
1908
- constructor(body) {
2225
+ constructor(body, traceId) {
1909
2226
  super(
1910
- `INVALID_PATH_PATTERN: ${body.message}`
2227
+ `INVALID_PATH_PATTERN: ${body.message}${traceId ? `
2228
+ TraceId: ${traceId}` : ""}`
1911
2229
  );
1912
2230
  this.body = body;
2231
+ this.traceId = traceId;
1913
2232
  this.name = "InvalidPathPatternError";
1914
2233
  }
1915
2234
  static code = "INVALID_PATH_PATTERN";
@@ -1917,11 +2236,13 @@ class InvalidPathPatternError extends Error {
1917
2236
  static description = `Invalid path pattern: {reason}`;
1918
2237
  }
1919
2238
  class EmptyQueryError extends Error {
1920
- constructor(body) {
2239
+ constructor(body, traceId) {
1921
2240
  super(
1922
- `EMPTY_QUERY: ${body.message}`
2241
+ `EMPTY_QUERY: ${body.message}${traceId ? `
2242
+ TraceId: ${traceId}` : ""}`
1923
2243
  );
1924
2244
  this.body = body;
2245
+ this.traceId = traceId;
1925
2246
  this.name = "EmptyQueryError";
1926
2247
  }
1927
2248
  static code = "EMPTY_QUERY";
@@ -1929,11 +2250,13 @@ class EmptyQueryError extends Error {
1929
2250
  static description = `Query must not be empty`;
1930
2251
  }
1931
2252
  class PackfileError extends Error {
1932
- constructor(body) {
2253
+ constructor(body, traceId) {
1933
2254
  super(
1934
- `PACKFILE: ${body.message}`
2255
+ `PACKFILE: ${body.message}${traceId ? `
2256
+ TraceId: ${traceId}` : ""}`
1935
2257
  );
1936
2258
  this.body = body;
2259
+ this.traceId = traceId;
1937
2260
  this.name = "PackfileError";
1938
2261
  }
1939
2262
  static code = "PACKFILE";
@@ -1941,11 +2264,13 @@ class PackfileError extends Error {
1941
2264
  static description = `Error building packfile`;
1942
2265
  }
1943
2266
  class InvalidRangeError extends Error {
1944
- constructor(body) {
2267
+ constructor(body, traceId) {
1945
2268
  super(
1946
- `INVALID_RANGE: ${body.message}`
2269
+ `INVALID_RANGE: ${body.message}${traceId ? `
2270
+ TraceId: ${traceId}` : ""}`
1947
2271
  );
1948
2272
  this.body = body;
2273
+ this.traceId = traceId;
1949
2274
  this.name = "InvalidRangeError";
1950
2275
  }
1951
2276
  static code = "INVALID_RANGE";
@@ -1953,11 +2278,13 @@ class InvalidRangeError extends Error {
1953
2278
  static description = `Invalid range: 'until' commit ({until}) must be a descendant of 'since' commit ({since}). In other words, 'until' must be newer than 'since' in the commit graph.`;
1954
2279
  }
1955
2280
  class OffsetWithSelectorError extends Error {
1956
- constructor(body) {
2281
+ constructor(body, traceId) {
1957
2282
  super(
1958
- `OFFSET_WITH_SELECTOR: ${body.message}`
2283
+ `OFFSET_WITH_SELECTOR: ${body.message}${traceId ? `
2284
+ TraceId: ${traceId}` : ""}`
1959
2285
  );
1960
2286
  this.body = body;
2287
+ this.traceId = traceId;
1961
2288
  this.name = "OffsetWithSelectorError";
1962
2289
  }
1963
2290
  static code = "OFFSET_WITH_SELECTOR";
@@ -1965,11 +2292,13 @@ class OffsetWithSelectorError extends Error {
1965
2292
  static description = `Cannot use 'offset' parameter together with 'since' or 'until'. Use 'since' for cursor-based pagination.`;
1966
2293
  }
1967
2294
  class CommitNotInBranchError extends Error {
1968
- constructor(body) {
2295
+ constructor(body, traceId) {
1969
2296
  super(
1970
- `COMMIT_NOT_IN_BRANCH: ${body.message}`
2297
+ `COMMIT_NOT_IN_BRANCH: ${body.message}${traceId ? `
2298
+ TraceId: ${traceId}` : ""}`
1971
2299
  );
1972
2300
  this.body = body;
2301
+ this.traceId = traceId;
1973
2302
  this.name = "CommitNotInBranchError";
1974
2303
  }
1975
2304
  static code = "COMMIT_NOT_IN_BRANCH";
@@ -1977,11 +2306,13 @@ class CommitNotInBranchError extends Error {
1977
2306
  static description = `Commit {sha} is not in the history of branch {branch}`;
1978
2307
  }
1979
2308
  class GitHubSyncConflictError extends Error {
1980
- constructor(body) {
2309
+ constructor(body, traceId) {
1981
2310
  super(
1982
- `GIT_HUB_SYNC_CONFLICT: ${body.message}`
2311
+ `GIT_HUB_SYNC_CONFLICT: ${body.message}${traceId ? `
2312
+ TraceId: ${traceId}` : ""}`
1983
2313
  );
1984
2314
  this.body = body;
2315
+ this.traceId = traceId;
1985
2316
  this.name = "GitHubSyncConflictError";
1986
2317
  }
1987
2318
  static code = "GIT_HUB_SYNC_CONFLICT";
@@ -1989,11 +2320,13 @@ class GitHubSyncConflictError extends Error {
1989
2320
  static description = `GitHub Sync Conflict: {message}`;
1990
2321
  }
1991
2322
  class InvalidObjectIdError extends Error {
1992
- constructor(body) {
2323
+ constructor(body, traceId) {
1993
2324
  super(
1994
- `INVALID_OBJECT_ID: ${body.message}`
2325
+ `INVALID_OBJECT_ID: ${body.message}${traceId ? `
2326
+ TraceId: ${traceId}` : ""}`
1995
2327
  );
1996
2328
  this.body = body;
2329
+ this.traceId = traceId;
1997
2330
  this.name = "InvalidObjectIdError";
1998
2331
  }
1999
2332
  static code = "INVALID_OBJECT_ID";
@@ -2001,11 +2334,13 @@ class InvalidObjectIdError extends Error {
2001
2334
  static description = `Invalid object ID: {hash}`;
2002
2335
  }
2003
2336
  class TooManyConcurrentRepairsError extends Error {
2004
- constructor(body) {
2337
+ constructor(body, traceId) {
2005
2338
  super(
2006
- `TOO_MANY_CONCURRENT_REPAIRS: ${body.message}`
2339
+ `TOO_MANY_CONCURRENT_REPAIRS: ${body.message}${traceId ? `
2340
+ TraceId: ${traceId}` : ""}`
2007
2341
  );
2008
2342
  this.body = body;
2343
+ this.traceId = traceId;
2009
2344
  this.name = "TooManyConcurrentRepairsError";
2010
2345
  }
2011
2346
  static code = "TOO_MANY_CONCURRENT_REPAIRS";
@@ -2013,11 +2348,13 @@ class TooManyConcurrentRepairsError extends Error {
2013
2348
  static description = `Account already has {current} concurrent repo-repair jobs in flight (per-account limit: {limit}); wait for one to finish or cancel it before starting another`;
2014
2349
  }
2015
2350
  class AlreadyInProgressError extends Error {
2016
- constructor(body) {
2351
+ constructor(body, traceId) {
2017
2352
  super(
2018
- `ALREADY_IN_PROGRESS: ${body.message}`
2353
+ `ALREADY_IN_PROGRESS: ${body.message}${traceId ? `
2354
+ TraceId: ${traceId}` : ""}`
2019
2355
  );
2020
2356
  this.body = body;
2357
+ this.traceId = traceId;
2021
2358
  this.name = "AlreadyInProgressError";
2022
2359
  }
2023
2360
  static code = "ALREADY_IN_PROGRESS";
@@ -2025,11 +2362,13 @@ class AlreadyInProgressError extends Error {
2025
2362
  static description = `A repair job is already in progress for this repository: {existing_job_id}`;
2026
2363
  }
2027
2364
  class JobNotFoundError extends Error {
2028
- constructor(body) {
2365
+ constructor(body, traceId) {
2029
2366
  super(
2030
- `JOB_NOT_FOUND: ${body.message}`
2367
+ `JOB_NOT_FOUND: ${body.message}${traceId ? `
2368
+ TraceId: ${traceId}` : ""}`
2031
2369
  );
2032
2370
  this.body = body;
2371
+ this.traceId = traceId;
2033
2372
  this.name = "JobNotFoundError";
2034
2373
  }
2035
2374
  static code = "JOB_NOT_FOUND";
@@ -2037,11 +2376,13 @@ class JobNotFoundError extends Error {
2037
2376
  static description = `Repair job not found: {job_id}`;
2038
2377
  }
2039
2378
  class UnavailableError extends Error {
2040
- constructor(body) {
2379
+ constructor(body, traceId) {
2041
2380
  super(
2042
- `UNAVAILABLE: ${body.message}`
2381
+ `UNAVAILABLE: ${body.message}${traceId ? `
2382
+ TraceId: ${traceId}` : ""}`
2043
2383
  );
2044
2384
  this.body = body;
2385
+ this.traceId = traceId;
2045
2386
  this.name = "UnavailableError";
2046
2387
  }
2047
2388
  static code = "UNAVAILABLE";
@@ -2049,11 +2390,13 @@ class UnavailableError extends Error {
2049
2390
  static description = `Cron service unavailable`;
2050
2391
  }
2051
2392
  class ScheduleNotFoundError extends Error {
2052
- constructor(body) {
2393
+ constructor(body, traceId) {
2053
2394
  super(
2054
- `SCHEDULE_NOT_FOUND: ${body.message}`
2395
+ `SCHEDULE_NOT_FOUND: ${body.message}${traceId ? `
2396
+ TraceId: ${traceId}` : ""}`
2055
2397
  );
2056
2398
  this.body = body;
2399
+ this.traceId = traceId;
2057
2400
  this.name = "ScheduleNotFoundError";
2058
2401
  }
2059
2402
  static code = "SCHEDULE_NOT_FOUND";
@@ -2061,11 +2404,13 @@ class ScheduleNotFoundError extends Error {
2061
2404
  static description = `Schedule not found`;
2062
2405
  }
2063
2406
  class ServiceUnavailableError extends Error {
2064
- constructor(body) {
2407
+ constructor(body, traceId) {
2065
2408
  super(
2066
- `SERVICE_UNAVAILABLE: ${body.message}`
2409
+ `SERVICE_UNAVAILABLE: ${body.message}${traceId ? `
2410
+ TraceId: ${traceId}` : ""}`
2067
2411
  );
2068
2412
  this.body = body;
2413
+ this.traceId = traceId;
2069
2414
  this.name = "ServiceUnavailableError";
2070
2415
  }
2071
2416
  static code = "SERVICE_UNAVAILABLE";
@@ -2073,11 +2418,13 @@ class ServiceUnavailableError extends Error {
2073
2418
  static description = `Cron service not configured`;
2074
2419
  }
2075
2420
  class RepairAlreadyInProgressError extends Error {
2076
- constructor(body) {
2421
+ constructor(body, traceId) {
2077
2422
  super(
2078
- `REPAIR_ALREADY_IN_PROGRESS: ${body.message}`
2423
+ `REPAIR_ALREADY_IN_PROGRESS: ${body.message}${traceId ? `
2424
+ TraceId: ${traceId}` : ""}`
2079
2425
  );
2080
2426
  this.body = body;
2427
+ this.traceId = traceId;
2081
2428
  this.name = "RepairAlreadyInProgressError";
2082
2429
  }
2083
2430
  static code = "REPAIR_ALREADY_IN_PROGRESS";
@@ -2085,11 +2432,13 @@ class RepairAlreadyInProgressError extends Error {
2085
2432
  static description = `A repair job is already in progress for this repository: {existing_job_id}`;
2086
2433
  }
2087
2434
  class MemoryStorageQuotaExceededError extends Error {
2088
- constructor(body) {
2435
+ constructor(body, traceId) {
2089
2436
  super(
2090
- `MEMORY_STORAGE_QUOTA_EXCEEDED: ${body.message}`
2437
+ `MEMORY_STORAGE_QUOTA_EXCEEDED: ${body.message}${traceId ? `
2438
+ TraceId: ${traceId}` : ""}`
2091
2439
  );
2092
2440
  this.body = body;
2441
+ this.traceId = traceId;
2093
2442
  this.name = "MemoryStorageQuotaExceededError";
2094
2443
  }
2095
2444
  static code = "MEMORY_STORAGE_QUOTA_EXCEEDED";
@@ -2097,11 +2446,13 @@ class MemoryStorageQuotaExceededError extends Error {
2097
2446
  static description = `VM memory storage quota exceeded: your plan allows {limit} MB total VM memory storage, you currently use {current} MB and this snapshot would add {requested} MB`;
2098
2447
  }
2099
2448
  class RootfsStorageQuotaExceededError extends Error {
2100
- constructor(body) {
2449
+ constructor(body, traceId) {
2101
2450
  super(
2102
- `ROOTFS_STORAGE_QUOTA_EXCEEDED: ${body.message}`
2451
+ `ROOTFS_STORAGE_QUOTA_EXCEEDED: ${body.message}${traceId ? `
2452
+ TraceId: ${traceId}` : ""}`
2103
2453
  );
2104
2454
  this.body = body;
2455
+ this.traceId = traceId;
2105
2456
  this.name = "RootfsStorageQuotaExceededError";
2106
2457
  }
2107
2458
  static code = "ROOTFS_STORAGE_QUOTA_EXCEEDED";
@@ -2109,11 +2460,13 @@ class RootfsStorageQuotaExceededError extends Error {
2109
2460
  static description = `Rootfs storage quota exceeded: your plan allows {limit} MB total VM rootfs storage, you currently use {current} MB and this VM would add {requested} MB`;
2110
2461
  }
2111
2462
  class RootfsSizeTooLargeError extends Error {
2112
- constructor(body) {
2463
+ constructor(body, traceId) {
2113
2464
  super(
2114
- `ROOTFS_SIZE_TOO_LARGE: ${body.message}`
2465
+ `ROOTFS_SIZE_TOO_LARGE: ${body.message}${traceId ? `
2466
+ TraceId: ${traceId}` : ""}`
2115
2467
  );
2116
2468
  this.body = body;
2469
+ this.traceId = traceId;
2117
2470
  this.name = "RootfsSizeTooLargeError";
2118
2471
  }
2119
2472
  static code = "ROOTFS_SIZE_TOO_LARGE";
@@ -2121,11 +2474,13 @@ class RootfsSizeTooLargeError extends Error {
2121
2474
  static description = `rootfsSizeGb {got_gb} is too large`;
2122
2475
  }
2123
2476
  class MemSizeTooLargeError extends Error {
2124
- constructor(body) {
2477
+ constructor(body, traceId) {
2125
2478
  super(
2126
- `MEM_SIZE_TOO_LARGE: ${body.message}`
2479
+ `MEM_SIZE_TOO_LARGE: ${body.message}${traceId ? `
2480
+ TraceId: ${traceId}` : ""}`
2127
2481
  );
2128
2482
  this.body = body;
2483
+ this.traceId = traceId;
2129
2484
  this.name = "MemSizeTooLargeError";
2130
2485
  }
2131
2486
  static code = "MEM_SIZE_TOO_LARGE";
@@ -2133,11 +2488,13 @@ class MemSizeTooLargeError extends Error {
2133
2488
  static description = `memSizeGb {got_gb} is too large`;
2134
2489
  }
2135
2490
  class RootfsOverPlanLimitError extends Error {
2136
- constructor(body) {
2491
+ constructor(body, traceId) {
2137
2492
  super(
2138
- `ROOTFS_OVER_PLAN_LIMIT: ${body.message}`
2493
+ `ROOTFS_OVER_PLAN_LIMIT: ${body.message}${traceId ? `
2494
+ TraceId: ${traceId}` : ""}`
2139
2495
  );
2140
2496
  this.body = body;
2497
+ this.traceId = traceId;
2141
2498
  this.name = "RootfsOverPlanLimitError";
2142
2499
  }
2143
2500
  static code = "ROOTFS_OVER_PLAN_LIMIT";
@@ -2145,11 +2502,13 @@ class RootfsOverPlanLimitError extends Error {
2145
2502
  static description = `rootfsSizeMb {got} MB exceeds your plan's maximum of {max} MB`;
2146
2503
  }
2147
2504
  class MemOverPlanLimitError extends Error {
2148
- constructor(body) {
2505
+ constructor(body, traceId) {
2149
2506
  super(
2150
- `MEM_OVER_PLAN_LIMIT: ${body.message}`
2507
+ `MEM_OVER_PLAN_LIMIT: ${body.message}${traceId ? `
2508
+ TraceId: ${traceId}` : ""}`
2151
2509
  );
2152
2510
  this.body = body;
2511
+ this.traceId = traceId;
2153
2512
  this.name = "MemOverPlanLimitError";
2154
2513
  }
2155
2514
  static code = "MEM_OVER_PLAN_LIMIT";
@@ -2157,11 +2516,13 @@ class MemOverPlanLimitError extends Error {
2157
2516
  static description = `memSizeMb {got} MiB exceeds your plan's maximum of {max} MiB`;
2158
2517
  }
2159
2518
  class VcpuOverPlanLimitError extends Error {
2160
- constructor(body) {
2519
+ constructor(body, traceId) {
2161
2520
  super(
2162
- `VCPU_OVER_PLAN_LIMIT: ${body.message}`
2521
+ `VCPU_OVER_PLAN_LIMIT: ${body.message}${traceId ? `
2522
+ TraceId: ${traceId}` : ""}`
2163
2523
  );
2164
2524
  this.body = body;
2525
+ this.traceId = traceId;
2165
2526
  this.name = "VcpuOverPlanLimitError";
2166
2527
  }
2167
2528
  static code = "VCPU_OVER_PLAN_LIMIT";
@@ -2169,11 +2530,13 @@ class VcpuOverPlanLimitError extends Error {
2169
2530
  static description = `vcpuCount {got} exceeds your plan's maximum of {max}`;
2170
2531
  }
2171
2532
  class CustomSizingNotAllowedError extends Error {
2172
- constructor(body) {
2533
+ constructor(body, traceId) {
2173
2534
  super(
2174
- `CUSTOM_SIZING_NOT_ALLOWED: ${body.message}`
2535
+ `CUSTOM_SIZING_NOT_ALLOWED: ${body.message}${traceId ? `
2536
+ TraceId: ${traceId}` : ""}`
2175
2537
  );
2176
2538
  this.body = body;
2539
+ this.traceId = traceId;
2177
2540
  this.name = "CustomSizingNotAllowedError";
2178
2541
  }
2179
2542
  static code = "CUSTOM_SIZING_NOT_ALLOWED";
@@ -2181,11 +2544,13 @@ class CustomSizingNotAllowedError extends Error {
2181
2544
  static description = `Your plan does not allow custom VM sizing (vcpu/memory/rootfs). Upgrade your plan or omit these fields to use the plan defaults.`;
2182
2545
  }
2183
2546
  class SnapshotLimitExceededError extends Error {
2184
- constructor(body) {
2547
+ constructor(body, traceId) {
2185
2548
  super(
2186
- `SNAPSHOT_LIMIT_EXCEEDED: ${body.message}`
2549
+ `SNAPSHOT_LIMIT_EXCEEDED: ${body.message}${traceId ? `
2550
+ TraceId: ${traceId}` : ""}`
2187
2551
  );
2188
2552
  this.body = body;
2553
+ this.traceId = traceId;
2189
2554
  this.name = "SnapshotLimitExceededError";
2190
2555
  }
2191
2556
  static code = "SNAPSHOT_LIMIT_EXCEEDED";
@@ -2193,11 +2558,13 @@ class SnapshotLimitExceededError extends Error {
2193
2558
  static description = `Snapshot limit exceeded: your plan allows {limit} total snapshots, you currently have {current}`;
2194
2559
  }
2195
2560
  class PersistentVmsNotAllowedError extends Error {
2196
- constructor(body) {
2561
+ constructor(body, traceId) {
2197
2562
  super(
2198
- `PERSISTENT_VMS_NOT_ALLOWED: ${body.message}`
2563
+ `PERSISTENT_VMS_NOT_ALLOWED: ${body.message}${traceId ? `
2564
+ TraceId: ${traceId}` : ""}`
2199
2565
  );
2200
2566
  this.body = body;
2567
+ this.traceId = traceId;
2201
2568
  this.name = "PersistentVmsNotAllowedError";
2202
2569
  }
2203
2570
  static code = "PERSISTENT_VMS_NOT_ALLOWED";
@@ -2205,11 +2572,13 @@ class PersistentVmsNotAllowedError extends Error {
2205
2572
  static description = `Your plan does not allow persistent VMs. Use sticky or ephemeral persistence instead, or upgrade your plan.`;
2206
2573
  }
2207
2574
  class TotalVmLimitExceededError extends Error {
2208
- constructor(body) {
2575
+ constructor(body, traceId) {
2209
2576
  super(
2210
- `TOTAL_VM_LIMIT_EXCEEDED: ${body.message}`
2577
+ `TOTAL_VM_LIMIT_EXCEEDED: ${body.message}${traceId ? `
2578
+ TraceId: ${traceId}` : ""}`
2211
2579
  );
2212
2580
  this.body = body;
2581
+ this.traceId = traceId;
2213
2582
  this.name = "TotalVmLimitExceededError";
2214
2583
  }
2215
2584
  static code = "TOTAL_VM_LIMIT_EXCEEDED";
@@ -2217,11 +2586,13 @@ class TotalVmLimitExceededError extends Error {
2217
2586
  static description = `Total VM limit exceeded: your plan allows {limit} total VMs, you currently have {current}`;
2218
2587
  }
2219
2588
  class VmLimitExceededError extends Error {
2220
- constructor(body) {
2589
+ constructor(body, traceId) {
2221
2590
  super(
2222
- `VM_LIMIT_EXCEEDED: ${body.message}`
2591
+ `VM_LIMIT_EXCEEDED: ${body.message}${traceId ? `
2592
+ TraceId: ${traceId}` : ""}`
2223
2593
  );
2224
2594
  this.body = body;
2595
+ this.traceId = traceId;
2225
2596
  this.name = "VmLimitExceededError";
2226
2597
  }
2227
2598
  static code = "VM_LIMIT_EXCEEDED";
@@ -2229,11 +2600,13 @@ class VmLimitExceededError extends Error {
2229
2600
  static description = `VM limit exceeded: your plan allows {limit} active VMs, you currently have {current}`;
2230
2601
  }
2231
2602
  class ObservabilityDatabaseErrorError extends Error {
2232
- constructor(body) {
2603
+ constructor(body, traceId) {
2233
2604
  super(
2234
- `OBSERVABILITY_DATABASE_ERROR: ${body.message}`
2605
+ `OBSERVABILITY_DATABASE_ERROR: ${body.message}${traceId ? `
2606
+ TraceId: ${traceId}` : ""}`
2235
2607
  );
2236
2608
  this.body = body;
2609
+ this.traceId = traceId;
2237
2610
  this.name = "ObservabilityDatabaseErrorError";
2238
2611
  }
2239
2612
  static code = "OBSERVABILITY_DATABASE_ERROR";
@@ -2241,11 +2614,13 @@ class ObservabilityDatabaseErrorError extends Error {
2241
2614
  static description = `Database operation failed: {message}`;
2242
2615
  }
2243
2616
  class ObservabilityAccessDeniedError extends Error {
2244
- constructor(body) {
2617
+ constructor(body, traceId) {
2245
2618
  super(
2246
- `OBSERVABILITY_ACCESS_DENIED: ${body.message}`
2619
+ `OBSERVABILITY_ACCESS_DENIED: ${body.message}${traceId ? `
2620
+ TraceId: ${traceId}` : ""}`
2247
2621
  );
2248
2622
  this.body = body;
2623
+ this.traceId = traceId;
2249
2624
  this.name = "ObservabilityAccessDeniedError";
2250
2625
  }
2251
2626
  static code = "OBSERVABILITY_ACCESS_DENIED";
@@ -2253,11 +2628,13 @@ class ObservabilityAccessDeniedError extends Error {
2253
2628
  static description = `Access denied to logs for deployment: {deployment_id}`;
2254
2629
  }
2255
2630
  class ParseLogsFailedError extends Error {
2256
- constructor(body) {
2631
+ constructor(body, traceId) {
2257
2632
  super(
2258
- `PARSE_LOGS_FAILED: ${body.message}`
2633
+ `PARSE_LOGS_FAILED: ${body.message}${traceId ? `
2634
+ TraceId: ${traceId}` : ""}`
2259
2635
  );
2260
2636
  this.body = body;
2637
+ this.traceId = traceId;
2261
2638
  this.name = "ParseLogsFailedError";
2262
2639
  }
2263
2640
  static code = "PARSE_LOGS_FAILED";
@@ -2265,11 +2642,13 @@ class ParseLogsFailedError extends Error {
2265
2642
  static description = `Failed to parse logs: {message}`;
2266
2643
  }
2267
2644
  class RetrieveLogsFailedError extends Error {
2268
- constructor(body) {
2645
+ constructor(body, traceId) {
2269
2646
  super(
2270
- `RETRIEVE_LOGS_FAILED: ${body.message}`
2647
+ `RETRIEVE_LOGS_FAILED: ${body.message}${traceId ? `
2648
+ TraceId: ${traceId}` : ""}`
2271
2649
  );
2272
2650
  this.body = body;
2651
+ this.traceId = traceId;
2273
2652
  this.name = "RetrieveLogsFailedError";
2274
2653
  }
2275
2654
  static code = "RETRIEVE_LOGS_FAILED";
@@ -2277,11 +2656,13 @@ class RetrieveLogsFailedError extends Error {
2277
2656
  static description = `Failed to retrieve logs: {message}`;
2278
2657
  }
2279
2658
  class InvalidQueryError extends Error {
2280
- constructor(body) {
2659
+ constructor(body, traceId) {
2281
2660
  super(
2282
- `INVALID_QUERY: ${body.message}`
2661
+ `INVALID_QUERY: ${body.message}${traceId ? `
2662
+ TraceId: ${traceId}` : ""}`
2283
2663
  );
2284
2664
  this.body = body;
2665
+ this.traceId = traceId;
2285
2666
  this.name = "InvalidQueryError";
2286
2667
  }
2287
2668
  static code = "INVALID_QUERY";
@@ -2289,11 +2670,13 @@ class InvalidQueryError extends Error {
2289
2670
  static description = `Invalid log query: {message}`;
2290
2671
  }
2291
2672
  class LogsNotFoundError extends Error {
2292
- constructor(body) {
2673
+ constructor(body, traceId) {
2293
2674
  super(
2294
- `LOGS_NOT_FOUND: ${body.message}`
2675
+ `LOGS_NOT_FOUND: ${body.message}${traceId ? `
2676
+ TraceId: ${traceId}` : ""}`
2295
2677
  );
2296
2678
  this.body = body;
2679
+ this.traceId = traceId;
2297
2680
  this.name = "LogsNotFoundError";
2298
2681
  }
2299
2682
  static code = "LOGS_NOT_FOUND";
@@ -2301,11 +2684,13 @@ class LogsNotFoundError extends Error {
2301
2684
  static description = `Logs not found for deployment: {deployment_id}`;
2302
2685
  }
2303
2686
  class TriggerErrorError extends Error {
2304
- constructor(body) {
2687
+ constructor(body, traceId) {
2305
2688
  super(
2306
- `TRIGGER_ERROR: ${body.message}`
2689
+ `TRIGGER_ERROR: ${body.message}${traceId ? `
2690
+ TraceId: ${traceId}` : ""}`
2307
2691
  );
2308
2692
  this.body = body;
2693
+ this.traceId = traceId;
2309
2694
  this.name = "TriggerErrorError";
2310
2695
  }
2311
2696
  static code = "TRIGGER_ERROR";
@@ -2313,11 +2698,13 @@ class TriggerErrorError extends Error {
2313
2698
  static description = `Failed to manage triggers: {message}`;
2314
2699
  }
2315
2700
  class TokenErrorError extends Error {
2316
- constructor(body) {
2701
+ constructor(body, traceId) {
2317
2702
  super(
2318
- `TOKEN_ERROR: ${body.message}`
2703
+ `TOKEN_ERROR: ${body.message}${traceId ? `
2704
+ TraceId: ${traceId}` : ""}`
2319
2705
  );
2320
2706
  this.body = body;
2707
+ this.traceId = traceId;
2321
2708
  this.name = "TokenErrorError";
2322
2709
  }
2323
2710
  static code = "TOKEN_ERROR";
@@ -2325,11 +2712,13 @@ class TokenErrorError extends Error {
2325
2712
  static description = `Failed to manage tokens: {message}`;
2326
2713
  }
2327
2714
  class PermissionErrorError extends Error {
2328
- constructor(body) {
2715
+ constructor(body, traceId) {
2329
2716
  super(
2330
- `PERMISSION_ERROR: ${body.message}`
2717
+ `PERMISSION_ERROR: ${body.message}${traceId ? `
2718
+ TraceId: ${traceId}` : ""}`
2331
2719
  );
2332
2720
  this.body = body;
2721
+ this.traceId = traceId;
2333
2722
  this.name = "PermissionErrorError";
2334
2723
  }
2335
2724
  static code = "PERMISSION_ERROR";
@@ -2337,11 +2726,13 @@ class PermissionErrorError extends Error {
2337
2726
  static description = `Failed to manage permissions: {message}`;
2338
2727
  }
2339
2728
  class IdentityErrorError extends Error {
2340
- constructor(body) {
2729
+ constructor(body, traceId) {
2341
2730
  super(
2342
- `IDENTITY_ERROR: ${body.message}`
2731
+ `IDENTITY_ERROR: ${body.message}${traceId ? `
2732
+ TraceId: ${traceId}` : ""}`
2343
2733
  );
2344
2734
  this.body = body;
2735
+ this.traceId = traceId;
2345
2736
  this.name = "IdentityErrorError";
2346
2737
  }
2347
2738
  static code = "IDENTITY_ERROR";
@@ -2349,11 +2740,13 @@ class IdentityErrorError extends Error {
2349
2740
  static description = `Failed to manage identity: {message}`;
2350
2741
  }
2351
2742
  class GetContentFailedError extends Error {
2352
- constructor(body) {
2743
+ constructor(body, traceId) {
2353
2744
  super(
2354
- `GET_CONTENT_FAILED: ${body.message}`
2745
+ `GET_CONTENT_FAILED: ${body.message}${traceId ? `
2746
+ TraceId: ${traceId}` : ""}`
2355
2747
  );
2356
2748
  this.body = body;
2749
+ this.traceId = traceId;
2357
2750
  this.name = "GetContentFailedError";
2358
2751
  }
2359
2752
  static code = "GET_CONTENT_FAILED";
@@ -2361,11 +2754,13 @@ class GetContentFailedError extends Error {
2361
2754
  static description = `Failed to get content: {message}`;
2362
2755
  }
2363
2756
  class ContentNotFoundError extends Error {
2364
- constructor(body) {
2757
+ constructor(body, traceId) {
2365
2758
  super(
2366
- `CONTENT_NOT_FOUND: ${body.message}`
2759
+ `CONTENT_NOT_FOUND: ${body.message}${traceId ? `
2760
+ TraceId: ${traceId}` : ""}`
2367
2761
  );
2368
2762
  this.body = body;
2763
+ this.traceId = traceId;
2369
2764
  this.name = "ContentNotFoundError";
2370
2765
  }
2371
2766
  static code = "CONTENT_NOT_FOUND";
@@ -2373,11 +2768,13 @@ class ContentNotFoundError extends Error {
2373
2768
  static description = `Content not found: {path}`;
2374
2769
  }
2375
2770
  class DownloadFailedError extends Error {
2376
- constructor(body) {
2771
+ constructor(body, traceId) {
2377
2772
  super(
2378
- `DOWNLOAD_FAILED: ${body.message}`
2773
+ `DOWNLOAD_FAILED: ${body.message}${traceId ? `
2774
+ TraceId: ${traceId}` : ""}`
2379
2775
  );
2380
2776
  this.body = body;
2777
+ this.traceId = traceId;
2381
2778
  this.name = "DownloadFailedError";
2382
2779
  }
2383
2780
  static code = "DOWNLOAD_FAILED";
@@ -2385,11 +2782,13 @@ class DownloadFailedError extends Error {
2385
2782
  static description = `Failed to download repository: {message}`;
2386
2783
  }
2387
2784
  class GitServerErrorError extends Error {
2388
- constructor(body) {
2785
+ constructor(body, traceId) {
2389
2786
  super(
2390
- `GIT_SERVER_ERROR: ${body.message}`
2787
+ `GIT_SERVER_ERROR: ${body.message}${traceId ? `
2788
+ TraceId: ${traceId}` : ""}`
2391
2789
  );
2392
2790
  this.body = body;
2791
+ this.traceId = traceId;
2393
2792
  this.name = "GitServerErrorError";
2394
2793
  }
2395
2794
  static code = "GIT_SERVER_ERROR";
@@ -2397,11 +2796,13 @@ class GitServerErrorError extends Error {
2397
2796
  static description = `Git server error: {message}`;
2398
2797
  }
2399
2798
  class ParseResponseErrorError extends Error {
2400
- constructor(body) {
2799
+ constructor(body, traceId) {
2401
2800
  super(
2402
- `PARSE_RESPONSE_ERROR: ${body.message}`
2801
+ `PARSE_RESPONSE_ERROR: ${body.message}${traceId ? `
2802
+ TraceId: ${traceId}` : ""}`
2403
2803
  );
2404
2804
  this.body = body;
2805
+ this.traceId = traceId;
2405
2806
  this.name = "ParseResponseErrorError";
2406
2807
  }
2407
2808
  static code = "PARSE_RESPONSE_ERROR";
@@ -2409,11 +2810,13 @@ class ParseResponseErrorError extends Error {
2409
2810
  static description = `Failed to parse response from Git server: {message}`;
2410
2811
  }
2411
2812
  class RepositoryAccessDeniedError extends Error {
2412
- constructor(body) {
2813
+ constructor(body, traceId) {
2413
2814
  super(
2414
- `REPOSITORY_ACCESS_DENIED: ${body.message}`
2815
+ `REPOSITORY_ACCESS_DENIED: ${body.message}${traceId ? `
2816
+ TraceId: ${traceId}` : ""}`
2415
2817
  );
2416
2818
  this.body = body;
2819
+ this.traceId = traceId;
2417
2820
  this.name = "RepositoryAccessDeniedError";
2418
2821
  }
2419
2822
  static code = "REPOSITORY_ACCESS_DENIED";
@@ -2421,11 +2824,13 @@ class RepositoryAccessDeniedError extends Error {
2421
2824
  static description = `Repository does not belong to account`;
2422
2825
  }
2423
2826
  class GitHubSyncFailedError extends Error {
2424
- constructor(body) {
2827
+ constructor(body, traceId) {
2425
2828
  super(
2426
- `GIT_HUB_SYNC_FAILED: ${body.message}`
2829
+ `GIT_HUB_SYNC_FAILED: ${body.message}${traceId ? `
2830
+ TraceId: ${traceId}` : ""}`
2427
2831
  );
2428
2832
  this.body = body;
2833
+ this.traceId = traceId;
2429
2834
  this.name = "GitHubSyncFailedError";
2430
2835
  }
2431
2836
  static code = "GIT_HUB_SYNC_FAILED";
@@ -2433,11 +2838,13 @@ class GitHubSyncFailedError extends Error {
2433
2838
  static description = `Failed to configure GitHub sync: {message}`;
2434
2839
  }
2435
2840
  class UpdateDefaultBranchFailedError extends Error {
2436
- constructor(body) {
2841
+ constructor(body, traceId) {
2437
2842
  super(
2438
- `UPDATE_DEFAULT_BRANCH_FAILED: ${body.message}`
2843
+ `UPDATE_DEFAULT_BRANCH_FAILED: ${body.message}${traceId ? `
2844
+ TraceId: ${traceId}` : ""}`
2439
2845
  );
2440
2846
  this.body = body;
2847
+ this.traceId = traceId;
2441
2848
  this.name = "UpdateDefaultBranchFailedError";
2442
2849
  }
2443
2850
  static code = "UPDATE_DEFAULT_BRANCH_FAILED";
@@ -2445,11 +2852,13 @@ class UpdateDefaultBranchFailedError extends Error {
2445
2852
  static description = `Failed to update default branch: {message}`;
2446
2853
  }
2447
2854
  class GetRepositoryInfoFailedError extends Error {
2448
- constructor(body) {
2855
+ constructor(body, traceId) {
2449
2856
  super(
2450
- `GET_REPOSITORY_INFO_FAILED: ${body.message}`
2857
+ `GET_REPOSITORY_INFO_FAILED: ${body.message}${traceId ? `
2858
+ TraceId: ${traceId}` : ""}`
2451
2859
  );
2452
2860
  this.body = body;
2861
+ this.traceId = traceId;
2453
2862
  this.name = "GetRepositoryInfoFailedError";
2454
2863
  }
2455
2864
  static code = "GET_REPOSITORY_INFO_FAILED";
@@ -2457,11 +2866,13 @@ class GetRepositoryInfoFailedError extends Error {
2457
2866
  static description = `Failed to get repository info: {message}`;
2458
2867
  }
2459
2868
  class ListRepositoriesFailedError extends Error {
2460
- constructor(body) {
2869
+ constructor(body, traceId) {
2461
2870
  super(
2462
- `LIST_REPOSITORIES_FAILED: ${body.message}`
2871
+ `LIST_REPOSITORIES_FAILED: ${body.message}${traceId ? `
2872
+ TraceId: ${traceId}` : ""}`
2463
2873
  );
2464
2874
  this.body = body;
2875
+ this.traceId = traceId;
2465
2876
  this.name = "ListRepositoriesFailedError";
2466
2877
  }
2467
2878
  static code = "LIST_REPOSITORIES_FAILED";
@@ -2469,11 +2880,13 @@ class ListRepositoriesFailedError extends Error {
2469
2880
  static description = `Failed to list repositories: {message}`;
2470
2881
  }
2471
2882
  class DeleteRepositoryFailedError extends Error {
2472
- constructor(body) {
2883
+ constructor(body, traceId) {
2473
2884
  super(
2474
- `DELETE_REPOSITORY_FAILED: ${body.message}`
2885
+ `DELETE_REPOSITORY_FAILED: ${body.message}${traceId ? `
2886
+ TraceId: ${traceId}` : ""}`
2475
2887
  );
2476
2888
  this.body = body;
2889
+ this.traceId = traceId;
2477
2890
  this.name = "DeleteRepositoryFailedError";
2478
2891
  }
2479
2892
  static code = "DELETE_REPOSITORY_FAILED";
@@ -2481,11 +2894,13 @@ class DeleteRepositoryFailedError extends Error {
2481
2894
  static description = `Failed to delete repository: {message}`;
2482
2895
  }
2483
2896
  class CreateRepositoryFailedError extends Error {
2484
- constructor(body) {
2897
+ constructor(body, traceId) {
2485
2898
  super(
2486
- `CREATE_REPOSITORY_FAILED: ${body.message}`
2899
+ `CREATE_REPOSITORY_FAILED: ${body.message}${traceId ? `
2900
+ TraceId: ${traceId}` : ""}`
2487
2901
  );
2488
2902
  this.body = body;
2903
+ this.traceId = traceId;
2489
2904
  this.name = "CreateRepositoryFailedError";
2490
2905
  }
2491
2906
  static code = "CREATE_REPOSITORY_FAILED";
@@ -2493,11 +2908,13 @@ class CreateRepositoryFailedError extends Error {
2493
2908
  static description = `Failed to create repository: {message}`;
2494
2909
  }
2495
2910
  class SerializationErrorError extends Error {
2496
- constructor(body) {
2911
+ constructor(body, traceId) {
2497
2912
  super(
2498
- `SERIALIZATION_ERROR: ${body.message}`
2913
+ `SERIALIZATION_ERROR: ${body.message}${traceId ? `
2914
+ TraceId: ${traceId}` : ""}`
2499
2915
  );
2500
2916
  this.body = body;
2917
+ this.traceId = traceId;
2501
2918
  this.name = "SerializationErrorError";
2502
2919
  }
2503
2920
  static code = "SERIALIZATION_ERROR";
@@ -2505,11 +2922,13 @@ class SerializationErrorError extends Error {
2505
2922
  static description = `Failed to serialize request: {message}`;
2506
2923
  }
2507
2924
  class GitInvalidRequestError extends Error {
2508
- constructor(body) {
2925
+ constructor(body, traceId) {
2509
2926
  super(
2510
- `GIT_INVALID_REQUEST: ${body.message}`
2927
+ `GIT_INVALID_REQUEST: ${body.message}${traceId ? `
2928
+ TraceId: ${traceId}` : ""}`
2511
2929
  );
2512
2930
  this.body = body;
2931
+ this.traceId = traceId;
2513
2932
  this.name = "GitInvalidRequestError";
2514
2933
  }
2515
2934
  static code = "GIT_INVALID_REQUEST";
@@ -2517,11 +2936,13 @@ class GitInvalidRequestError extends Error {
2517
2936
  static description = `Invalid request: {message}`;
2518
2937
  }
2519
2938
  class RepositoryNotFoundError extends Error {
2520
- constructor(body) {
2939
+ constructor(body, traceId) {
2521
2940
  super(
2522
- `REPOSITORY_NOT_FOUND: ${body.message}`
2941
+ `REPOSITORY_NOT_FOUND: ${body.message}${traceId ? `
2942
+ TraceId: ${traceId}` : ""}`
2523
2943
  );
2524
2944
  this.body = body;
2945
+ this.traceId = traceId;
2525
2946
  this.name = "RepositoryNotFoundError";
2526
2947
  }
2527
2948
  static code = "REPOSITORY_NOT_FOUND";
@@ -2529,11 +2950,13 @@ class RepositoryNotFoundError extends Error {
2529
2950
  static description = `Repository not found: {repo_id}`;
2530
2951
  }
2531
2952
  class DomainOwnershipVerificationFailedError extends Error {
2532
- constructor(body) {
2953
+ constructor(body, traceId) {
2533
2954
  super(
2534
- `DOMAIN_OWNERSHIP_VERIFICATION_FAILED: ${body.message}`
2955
+ `DOMAIN_OWNERSHIP_VERIFICATION_FAILED: ${body.message}${traceId ? `
2956
+ TraceId: ${traceId}` : ""}`
2535
2957
  );
2536
2958
  this.body = body;
2959
+ this.traceId = traceId;
2537
2960
  this.name = "DomainOwnershipVerificationFailedError";
2538
2961
  }
2539
2962
  static code = "DOMAIN_OWNERSHIP_VERIFICATION_FAILED";
@@ -2541,11 +2964,13 @@ class DomainOwnershipVerificationFailedError extends Error {
2541
2964
  static description = `Domain ownership verification failed`;
2542
2965
  }
2543
2966
  class ErrorDeletingRecordError extends Error {
2544
- constructor(body) {
2967
+ constructor(body, traceId) {
2545
2968
  super(
2546
- `ERROR_DELETING_RECORD: ${body.message}`
2969
+ `ERROR_DELETING_RECORD: ${body.message}${traceId ? `
2970
+ TraceId: ${traceId}` : ""}`
2547
2971
  );
2548
2972
  this.body = body;
2973
+ this.traceId = traceId;
2549
2974
  this.name = "ErrorDeletingRecordError";
2550
2975
  }
2551
2976
  static code = "ERROR_DELETING_RECORD";
@@ -2553,11 +2978,13 @@ class ErrorDeletingRecordError extends Error {
2553
2978
  static description = `Error deleting DNS record for {domain}/{name}: {message}`;
2554
2979
  }
2555
2980
  class RecordOwnershipErrorError extends Error {
2556
- constructor(body) {
2981
+ constructor(body, traceId) {
2557
2982
  super(
2558
- `RECORD_OWNERSHIP_ERROR: ${body.message}`
2983
+ `RECORD_OWNERSHIP_ERROR: ${body.message}${traceId ? `
2984
+ TraceId: ${traceId}` : ""}`
2559
2985
  );
2560
2986
  this.body = body;
2987
+ this.traceId = traceId;
2561
2988
  this.name = "RecordOwnershipErrorError";
2562
2989
  }
2563
2990
  static code = "RECORD_OWNERSHIP_ERROR";
@@ -2565,11 +2992,13 @@ class RecordOwnershipErrorError extends Error {
2565
2992
  static description = `Account {account_id} does not own record {record_id}`;
2566
2993
  }
2567
2994
  class ErrorCreatingRecordError extends Error {
2568
- constructor(body) {
2995
+ constructor(body, traceId) {
2569
2996
  super(
2570
- `ERROR_CREATING_RECORD: ${body.message}`
2997
+ `ERROR_CREATING_RECORD: ${body.message}${traceId ? `
2998
+ TraceId: ${traceId}` : ""}`
2571
2999
  );
2572
3000
  this.body = body;
3001
+ this.traceId = traceId;
2573
3002
  this.name = "ErrorCreatingRecordError";
2574
3003
  }
2575
3004
  static code = "ERROR_CREATING_RECORD";
@@ -2577,11 +3006,13 @@ class ErrorCreatingRecordError extends Error {
2577
3006
  static description = `Error creating DNS record: {message}`;
2578
3007
  }
2579
3008
  class DomainOwnershipErrorError extends Error {
2580
- constructor(body) {
3009
+ constructor(body, traceId) {
2581
3010
  super(
2582
- `DOMAIN_OWNERSHIP_ERROR: ${body.message}`
3011
+ `DOMAIN_OWNERSHIP_ERROR: ${body.message}${traceId ? `
3012
+ TraceId: ${traceId}` : ""}`
2583
3013
  );
2584
3014
  this.body = body;
3015
+ this.traceId = traceId;
2585
3016
  this.name = "DomainOwnershipErrorError";
2586
3017
  }
2587
3018
  static code = "DOMAIN_OWNERSHIP_ERROR";
@@ -2589,11 +3020,13 @@ class DomainOwnershipErrorError extends Error {
2589
3020
  static description = `Account {account_id} does not own domain {domain}`;
2590
3021
  }
2591
3022
  class UnauthorizedErrorError extends Error {
2592
- constructor(body) {
3023
+ constructor(body, traceId) {
2593
3024
  super(
2594
- `UNAUTHORIZED_ERROR: ${body.message}`
3025
+ `UNAUTHORIZED_ERROR: ${body.message}${traceId ? `
3026
+ TraceId: ${traceId}` : ""}`
2595
3027
  );
2596
3028
  this.body = body;
3029
+ this.traceId = traceId;
2597
3030
  this.name = "UnauthorizedErrorError";
2598
3031
  }
2599
3032
  static code = "UNAUTHORIZED_ERROR";
@@ -2601,11 +3034,13 @@ class UnauthorizedErrorError extends Error {
2601
3034
  static description = `Unauthorized request to {route}`;
2602
3035
  }
2603
3036
  class BranchNameEmptyError extends Error {
2604
- constructor(body) {
3037
+ constructor(body, traceId) {
2605
3038
  super(
2606
- `BRANCH_NAME_EMPTY: ${body.message}`
3039
+ `BRANCH_NAME_EMPTY: ${body.message}${traceId ? `
3040
+ TraceId: ${traceId}` : ""}`
2607
3041
  );
2608
3042
  this.body = body;
3043
+ this.traceId = traceId;
2609
3044
  this.name = "BranchNameEmptyError";
2610
3045
  }
2611
3046
  static code = "BRANCH_NAME_EMPTY";
@@ -2613,11 +3048,13 @@ class BranchNameEmptyError extends Error {
2613
3048
  static description = `Branch name cannot be empty`;
2614
3049
  }
2615
3050
  class ServerDeploymentFailedError extends Error {
2616
- constructor(body) {
3051
+ constructor(body, traceId) {
2617
3052
  super(
2618
- `SERVER_DEPLOYMENT_FAILED: ${body.message}`
3053
+ `SERVER_DEPLOYMENT_FAILED: ${body.message}${traceId ? `
3054
+ TraceId: ${traceId}` : ""}`
2619
3055
  );
2620
3056
  this.body = body;
3057
+ this.traceId = traceId;
2621
3058
  this.name = "ServerDeploymentFailedError";
2622
3059
  }
2623
3060
  static code = "SERVER_DEPLOYMENT_FAILED";
@@ -2625,11 +3062,13 @@ class ServerDeploymentFailedError extends Error {
2625
3062
  static description = `Failed to deploy to servers`;
2626
3063
  }
2627
3064
  class LockfileErrorError extends Error {
2628
- constructor(body) {
3065
+ constructor(body, traceId) {
2629
3066
  super(
2630
- `LOCKFILE_ERROR: ${body.message}`
3067
+ `LOCKFILE_ERROR: ${body.message}${traceId ? `
3068
+ TraceId: ${traceId}` : ""}`
2631
3069
  );
2632
3070
  this.body = body;
3071
+ this.traceId = traceId;
2633
3072
  this.name = "LockfileErrorError";
2634
3073
  }
2635
3074
  static code = "LOCKFILE_ERROR";
@@ -2637,11 +3076,13 @@ class LockfileErrorError extends Error {
2637
3076
  static description = `Failed to generate dependency lockfile: {message}`;
2638
3077
  }
2639
3078
  class UploadErrorError extends Error {
2640
- constructor(body) {
3079
+ constructor(body, traceId) {
2641
3080
  super(
2642
- `UPLOAD_ERROR: ${body.message}`
3081
+ `UPLOAD_ERROR: ${body.message}${traceId ? `
3082
+ TraceId: ${traceId}` : ""}`
2643
3083
  );
2644
3084
  this.body = body;
3085
+ this.traceId = traceId;
2645
3086
  this.name = "UploadErrorError";
2646
3087
  }
2647
3088
  static code = "UPLOAD_ERROR";
@@ -2649,11 +3090,13 @@ class UploadErrorError extends Error {
2649
3090
  static description = `Failed to upload deployment to storage`;
2650
3091
  }
2651
3092
  class DomainMappingErrorError extends Error {
2652
- constructor(body) {
3093
+ constructor(body, traceId) {
2653
3094
  super(
2654
- `DOMAIN_MAPPING_ERROR: ${body.message}`
3095
+ `DOMAIN_MAPPING_ERROR: ${body.message}${traceId ? `
3096
+ TraceId: ${traceId}` : ""}`
2655
3097
  );
2656
3098
  this.body = body;
3099
+ this.traceId = traceId;
2657
3100
  this.name = "DomainMappingErrorError";
2658
3101
  }
2659
3102
  static code = "DOMAIN_MAPPING_ERROR";
@@ -2661,11 +3104,13 @@ class DomainMappingErrorError extends Error {
2661
3104
  static description = `Failed to configure domain mapping for: {domain}`;
2662
3105
  }
2663
3106
  class CertificateProvisioningErrorError extends Error {
2664
- constructor(body) {
3107
+ constructor(body, traceId) {
2665
3108
  super(
2666
- `CERTIFICATE_PROVISIONING_ERROR: ${body.message}`
3109
+ `CERTIFICATE_PROVISIONING_ERROR: ${body.message}${traceId ? `
3110
+ TraceId: ${traceId}` : ""}`
2667
3111
  );
2668
3112
  this.body = body;
3113
+ this.traceId = traceId;
2669
3114
  this.name = "CertificateProvisioningErrorError";
2670
3115
  }
2671
3116
  static code = "CERTIFICATE_PROVISIONING_ERROR";
@@ -2673,11 +3118,13 @@ class CertificateProvisioningErrorError extends Error {
2673
3118
  static description = `Failed to provision certificate for domain: {domain}`;
2674
3119
  }
2675
3120
  class NoEntrypointFoundError extends Error {
2676
- constructor(body) {
3121
+ constructor(body, traceId) {
2677
3122
  super(
2678
- `NO_ENTRYPOINT_FOUND: ${body.message}`
3123
+ `NO_ENTRYPOINT_FOUND: ${body.message}${traceId ? `
3124
+ TraceId: ${traceId}` : ""}`
2679
3125
  );
2680
3126
  this.body = body;
3127
+ this.traceId = traceId;
2681
3128
  this.name = "NoEntrypointFoundError";
2682
3129
  }
2683
3130
  static code = "NO_ENTRYPOINT_FOUND";
@@ -2685,11 +3132,13 @@ class NoEntrypointFoundError extends Error {
2685
3132
  static description = `No entrypoint found in deployment`;
2686
3133
  }
2687
3134
  class EntrypointNotFoundError extends Error {
2688
- constructor(body) {
3135
+ constructor(body, traceId) {
2689
3136
  super(
2690
- `ENTRYPOINT_NOT_FOUND: ${body.message}`
3137
+ `ENTRYPOINT_NOT_FOUND: ${body.message}${traceId ? `
3138
+ TraceId: ${traceId}` : ""}`
2691
3139
  );
2692
3140
  this.body = body;
3141
+ this.traceId = traceId;
2693
3142
  this.name = "EntrypointNotFoundError";
2694
3143
  }
2695
3144
  static code = "ENTRYPOINT_NOT_FOUND";
@@ -2697,11 +3146,13 @@ class EntrypointNotFoundError extends Error {
2697
3146
  static description = `Entrypoint not found: {entrypoint}`;
2698
3147
  }
2699
3148
  class NoDomainOwnershipError extends Error {
2700
- constructor(body) {
3149
+ constructor(body, traceId) {
2701
3150
  super(
2702
- `NO_DOMAIN_OWNERSHIP: ${body.message}`
3151
+ `NO_DOMAIN_OWNERSHIP: ${body.message}${traceId ? `
3152
+ TraceId: ${traceId}` : ""}`
2703
3153
  );
2704
3154
  this.body = body;
3155
+ this.traceId = traceId;
2705
3156
  this.name = "NoDomainOwnershipError";
2706
3157
  }
2707
3158
  static code = "NO_DOMAIN_OWNERSHIP";
@@ -2709,11 +3160,13 @@ class NoDomainOwnershipError extends Error {
2709
3160
  static description = `No domain ownership for: {domain}`;
2710
3161
  }
2711
3162
  class InvalidDomainsError extends Error {
2712
- constructor(body) {
3163
+ constructor(body, traceId) {
2713
3164
  super(
2714
- `INVALID_DOMAINS: ${body.message}`
3165
+ `INVALID_DOMAINS: ${body.message}${traceId ? `
3166
+ TraceId: ${traceId}` : ""}`
2715
3167
  );
2716
3168
  this.body = body;
3169
+ this.traceId = traceId;
2717
3170
  this.name = "InvalidDomainsError";
2718
3171
  }
2719
3172
  static code = "INVALID_DOMAINS";
@@ -2721,11 +3174,13 @@ class InvalidDomainsError extends Error {
2721
3174
  static description = `Invalid domains provided`;
2722
3175
  }
2723
3176
  class WebDeploymentBadRequestError extends Error {
2724
- constructor(body) {
3177
+ constructor(body, traceId) {
2725
3178
  super(
2726
- `WEB_DEPLOYMENT_BAD_REQUEST: ${body.message}`
3179
+ `WEB_DEPLOYMENT_BAD_REQUEST: ${body.message}${traceId ? `
3180
+ TraceId: ${traceId}` : ""}`
2727
3181
  );
2728
3182
  this.body = body;
3183
+ this.traceId = traceId;
2729
3184
  this.name = "WebDeploymentBadRequestError";
2730
3185
  }
2731
3186
  static code = "WEB_DEPLOYMENT_BAD_REQUEST";
@@ -2733,11 +3188,13 @@ class WebDeploymentBadRequestError extends Error {
2733
3188
  static description = `Bad request: {message}`;
2734
3189
  }
2735
3190
  class TimeoutLimitExceededError extends Error {
2736
- constructor(body) {
3191
+ constructor(body, traceId) {
2737
3192
  super(
2738
- `TIMEOUT_LIMIT_EXCEEDED: ${body.message}`
3193
+ `TIMEOUT_LIMIT_EXCEEDED: ${body.message}${traceId ? `
3194
+ TraceId: ${traceId}` : ""}`
2739
3195
  );
2740
3196
  this.body = body;
3197
+ this.traceId = traceId;
2741
3198
  this.name = "TimeoutLimitExceededError";
2742
3199
  }
2743
3200
  static code = "TIMEOUT_LIMIT_EXCEEDED";
@@ -2745,11 +3202,13 @@ class TimeoutLimitExceededError extends Error {
2745
3202
  static description = `Timeout exceeds plan limit: requested {requested_ms}ms but your plan allows a maximum of {max_ms}ms`;
2746
3203
  }
2747
3204
  class DeploymentLimitExceededError extends Error {
2748
- constructor(body) {
3205
+ constructor(body, traceId) {
2749
3206
  super(
2750
- `DEPLOYMENT_LIMIT_EXCEEDED: ${body.message}`
3207
+ `DEPLOYMENT_LIMIT_EXCEEDED: ${body.message}${traceId ? `
3208
+ TraceId: ${traceId}` : ""}`
2751
3209
  );
2752
3210
  this.body = body;
3211
+ this.traceId = traceId;
2753
3212
  this.name = "DeploymentLimitExceededError";
2754
3213
  }
2755
3214
  static code = "DEPLOYMENT_LIMIT_EXCEEDED";
@@ -2757,11 +3216,13 @@ class DeploymentLimitExceededError extends Error {
2757
3216
  static description = `Daily deployment limit exceeded: your plan allows {limit} deployments per day, you have created {current} today`;
2758
3217
  }
2759
3218
  class DeploymentNotFoundError extends Error {
2760
- constructor(body) {
3219
+ constructor(body, traceId) {
2761
3220
  super(
2762
- `DEPLOYMENT_NOT_FOUND: ${body.message}`
3221
+ `DEPLOYMENT_NOT_FOUND: ${body.message}${traceId ? `
3222
+ TraceId: ${traceId}` : ""}`
2763
3223
  );
2764
3224
  this.body = body;
3225
+ this.traceId = traceId;
2765
3226
  this.name = "DeploymentNotFoundError";
2766
3227
  }
2767
3228
  static code = "DEPLOYMENT_NOT_FOUND";
@@ -2769,11 +3230,13 @@ class DeploymentNotFoundError extends Error {
2769
3230
  static description = `Deployment not found`;
2770
3231
  }
2771
3232
  class ResizeFailedError extends Error {
2772
- constructor(body) {
3233
+ constructor(body, traceId) {
2773
3234
  super(
2774
- `RESIZE_FAILED: ${body.message}`
3235
+ `RESIZE_FAILED: ${body.message}${traceId ? `
3236
+ TraceId: ${traceId}` : ""}`
2775
3237
  );
2776
3238
  this.body = body;
3239
+ this.traceId = traceId;
2777
3240
  this.name = "ResizeFailedError";
2778
3241
  }
2779
3242
  static code = "RESIZE_FAILED";
@@ -2781,11 +3244,13 @@ class ResizeFailedError extends Error {
2781
3244
  static description = `Failed to resize VM: {message}`;
2782
3245
  }
2783
3246
  class InternalResizeVmNotFoundError extends Error {
2784
- constructor(body) {
3247
+ constructor(body, traceId) {
2785
3248
  super(
2786
- `INTERNAL_RESIZE_VM_NOT_FOUND: ${body.message}`
3249
+ `INTERNAL_RESIZE_VM_NOT_FOUND: ${body.message}${traceId ? `
3250
+ TraceId: ${traceId}` : ""}`
2787
3251
  );
2788
3252
  this.body = body;
3253
+ this.traceId = traceId;
2789
3254
  this.name = "InternalResizeVmNotFoundError";
2790
3255
  }
2791
3256
  static code = "INTERNAL_RESIZE_VM_NOT_FOUND";
@@ -2793,11 +3258,13 @@ class InternalResizeVmNotFoundError extends Error {
2793
3258
  static description = `VM not found`;
2794
3259
  }
2795
3260
  class ExecuteLimitExceededError extends Error {
2796
- constructor(body) {
3261
+ constructor(body, traceId) {
2797
3262
  super(
2798
- `EXECUTE_LIMIT_EXCEEDED: ${body.message}`
3263
+ `EXECUTE_LIMIT_EXCEEDED: ${body.message}${traceId ? `
3264
+ TraceId: ${traceId}` : ""}`
2799
3265
  );
2800
3266
  this.body = body;
3267
+ this.traceId = traceId;
2801
3268
  this.name = "ExecuteLimitExceededError";
2802
3269
  }
2803
3270
  static code = "EXECUTE_LIMIT_EXCEEDED";
@@ -2805,11 +3272,13 @@ class ExecuteLimitExceededError extends Error {
2805
3272
  static description = `Execute runs limit exceeded: your plan allows {limit} runs per month, you have used {current}`;
2806
3273
  }
2807
3274
  class DomainOwnershipNotVerifiedError extends Error {
2808
- constructor(body) {
3275
+ constructor(body, traceId) {
2809
3276
  super(
2810
- `DOMAIN_OWNERSHIP_NOT_VERIFIED: ${body.message}`
3277
+ `DOMAIN_OWNERSHIP_NOT_VERIFIED: ${body.message}${traceId ? `
3278
+ TraceId: ${traceId}` : ""}`
2811
3279
  );
2812
3280
  this.body = body;
3281
+ this.traceId = traceId;
2813
3282
  this.name = "DomainOwnershipNotVerifiedError";
2814
3283
  }
2815
3284
  static code = "DOMAIN_OWNERSHIP_NOT_VERIFIED";
@@ -2817,11 +3286,13 @@ class DomainOwnershipNotVerifiedError extends Error {
2817
3286
  static description = `You have not verified ownership of domain: {domain}`;
2818
3287
  }
2819
3288
  class VmAccessDeniedForMappingError extends Error {
2820
- constructor(body) {
3289
+ constructor(body, traceId) {
2821
3290
  super(
2822
- `VM_ACCESS_DENIED_FOR_MAPPING: ${body.message}`
3291
+ `VM_ACCESS_DENIED_FOR_MAPPING: ${body.message}${traceId ? `
3292
+ TraceId: ${traceId}` : ""}`
2823
3293
  );
2824
3294
  this.body = body;
3295
+ this.traceId = traceId;
2825
3296
  this.name = "VmAccessDeniedForMappingError";
2826
3297
  }
2827
3298
  static code = "VM_ACCESS_DENIED_FOR_MAPPING";
@@ -2829,11 +3300,13 @@ class VmAccessDeniedForMappingError extends Error {
2829
3300
  static description = `You do not have permission to map to this VM: {vm_id}`;
2830
3301
  }
2831
3302
  class DeploymentAccessDeniedError extends Error {
2832
- constructor(body) {
3303
+ constructor(body, traceId) {
2833
3304
  super(
2834
- `DEPLOYMENT_ACCESS_DENIED: ${body.message}`
3305
+ `DEPLOYMENT_ACCESS_DENIED: ${body.message}${traceId ? `
3306
+ TraceId: ${traceId}` : ""}`
2835
3307
  );
2836
3308
  this.body = body;
3309
+ this.traceId = traceId;
2837
3310
  this.name = "DeploymentAccessDeniedError";
2838
3311
  }
2839
3312
  static code = "DEPLOYMENT_ACCESS_DENIED";
@@ -2841,11 +3314,13 @@ class DeploymentAccessDeniedError extends Error {
2841
3314
  static description = `You do not have permission to map to this deployment: {deployment_id}`;
2842
3315
  }
2843
3316
  class FailedToProvisionCertificateForMappingError extends Error {
2844
- constructor(body) {
3317
+ constructor(body, traceId) {
2845
3318
  super(
2846
- `FAILED_TO_PROVISION_CERTIFICATE_FOR_MAPPING: ${body.message}`
3319
+ `FAILED_TO_PROVISION_CERTIFICATE_FOR_MAPPING: ${body.message}${traceId ? `
3320
+ TraceId: ${traceId}` : ""}`
2847
3321
  );
2848
3322
  this.body = body;
3323
+ this.traceId = traceId;
2849
3324
  this.name = "FailedToProvisionCertificateForMappingError";
2850
3325
  }
2851
3326
  static code = "FAILED_TO_PROVISION_CERTIFICATE_FOR_MAPPING";
@@ -2853,11 +3328,13 @@ class FailedToProvisionCertificateForMappingError extends Error {
2853
3328
  static description = `Failed to provision certificate for mapping: {message}`;
2854
3329
  }
2855
3330
  class FailedInsertDomainMappingError extends Error {
2856
- constructor(body) {
3331
+ constructor(body, traceId) {
2857
3332
  super(
2858
- `FAILED_INSERT_DOMAIN_MAPPING: ${body.message}`
3333
+ `FAILED_INSERT_DOMAIN_MAPPING: ${body.message}${traceId ? `
3334
+ TraceId: ${traceId}` : ""}`
2859
3335
  );
2860
3336
  this.body = body;
3337
+ this.traceId = traceId;
2861
3338
  this.name = "FailedInsertDomainMappingError";
2862
3339
  }
2863
3340
  static code = "FAILED_INSERT_DOMAIN_MAPPING";
@@ -2865,11 +3342,13 @@ class FailedInsertDomainMappingError extends Error {
2865
3342
  static description = `Failed to insert domain mapping: {message}`;
2866
3343
  }
2867
3344
  class DomainAlreadyExistsError extends Error {
2868
- constructor(body) {
3345
+ constructor(body, traceId) {
2869
3346
  super(
2870
- `DOMAIN_ALREADY_EXISTS: ${body.message}`
3347
+ `DOMAIN_ALREADY_EXISTS: ${body.message}${traceId ? `
3348
+ TraceId: ${traceId}` : ""}`
2871
3349
  );
2872
3350
  this.body = body;
3351
+ this.traceId = traceId;
2873
3352
  this.name = "DomainAlreadyExistsError";
2874
3353
  }
2875
3354
  static code = "DOMAIN_ALREADY_EXISTS";
@@ -2877,11 +3356,13 @@ class DomainAlreadyExistsError extends Error {
2877
3356
  static description = `Domain already exists: {domain}`;
2878
3357
  }
2879
3358
  class FailedToInsertOwnershipError extends Error {
2880
- constructor(body) {
3359
+ constructor(body, traceId) {
2881
3360
  super(
2882
- `FAILED_TO_INSERT_OWNERSHIP: ${body.message}`
3361
+ `FAILED_TO_INSERT_OWNERSHIP: ${body.message}${traceId ? `
3362
+ TraceId: ${traceId}` : ""}`
2883
3363
  );
2884
3364
  this.body = body;
3365
+ this.traceId = traceId;
2885
3366
  this.name = "FailedToInsertOwnershipError";
2886
3367
  }
2887
3368
  static code = "FAILED_TO_INSERT_OWNERSHIP";
@@ -2889,11 +3370,13 @@ class FailedToInsertOwnershipError extends Error {
2889
3370
  static description = `Failed to insert domain ownership: {message}`;
2890
3371
  }
2891
3372
  class FailedRemoveDomainMappingError extends Error {
2892
- constructor(body) {
3373
+ constructor(body, traceId) {
2893
3374
  super(
2894
- `FAILED_REMOVE_DOMAIN_MAPPING: ${body.message}`
3375
+ `FAILED_REMOVE_DOMAIN_MAPPING: ${body.message}${traceId ? `
3376
+ TraceId: ${traceId}` : ""}`
2895
3377
  );
2896
3378
  this.body = body;
3379
+ this.traceId = traceId;
2897
3380
  this.name = "FailedRemoveDomainMappingError";
2898
3381
  }
2899
3382
  static code = "FAILED_REMOVE_DOMAIN_MAPPING";
@@ -2901,11 +3384,13 @@ class FailedRemoveDomainMappingError extends Error {
2901
3384
  static description = `Failed to remove domain mapping: {message}`;
2902
3385
  }
2903
3386
  class FailedPermissionsCheckError extends Error {
2904
- constructor(body) {
3387
+ constructor(body, traceId) {
2905
3388
  super(
2906
- `FAILED_PERMISSIONS_CHECK: ${body.message}`
3389
+ `FAILED_PERMISSIONS_CHECK: ${body.message}${traceId ? `
3390
+ TraceId: ${traceId}` : ""}`
2907
3391
  );
2908
3392
  this.body = body;
3393
+ this.traceId = traceId;
2909
3394
  this.name = "FailedPermissionsCheckError";
2910
3395
  }
2911
3396
  static code = "FAILED_PERMISSIONS_CHECK";
@@ -2913,11 +3398,13 @@ class FailedPermissionsCheckError extends Error {
2913
3398
  static description = `You do not have permission to delete the domain mapping for: {domain}`;
2914
3399
  }
2915
3400
  class FailedToCheckDomainMappingPermissionsError extends Error {
2916
- constructor(body) {
3401
+ constructor(body, traceId) {
2917
3402
  super(
2918
- `FAILED_TO_CHECK_DOMAIN_MAPPING_PERMISSIONS: ${body.message}`
3403
+ `FAILED_TO_CHECK_DOMAIN_MAPPING_PERMISSIONS: ${body.message}${traceId ? `
3404
+ TraceId: ${traceId}` : ""}`
2919
3405
  );
2920
3406
  this.body = body;
3407
+ this.traceId = traceId;
2921
3408
  this.name = "FailedToCheckDomainMappingPermissionsError";
2922
3409
  }
2923
3410
  static code = "FAILED_TO_CHECK_DOMAIN_MAPPING_PERMISSIONS";
@@ -2925,11 +3412,13 @@ class FailedToCheckDomainMappingPermissionsError extends Error {
2925
3412
  static description = `Failed to check permissions: {message}`;
2926
3413
  }
2927
3414
  class FailedToPreRegisterError extends Error {
2928
- constructor(body) {
3415
+ constructor(body, traceId) {
2929
3416
  super(
2930
- `FAILED_TO_PRE_REGISTER: ${body.message}`
3417
+ `FAILED_TO_PRE_REGISTER: ${body.message}${traceId ? `
3418
+ TraceId: ${traceId}` : ""}`
2931
3419
  );
2932
3420
  this.body = body;
3421
+ this.traceId = traceId;
2933
3422
  this.name = "FailedToPreRegisterError";
2934
3423
  }
2935
3424
  static code = "FAILED_TO_PRE_REGISTER";
@@ -2937,11 +3426,13 @@ class FailedToPreRegisterError extends Error {
2937
3426
  static description = `Failed to pre-register fork ownership for vm {vm_id}: {details}`;
2938
3427
  }
2939
3428
  class AccessDeniedError extends Error {
2940
- constructor(body) {
3429
+ constructor(body, traceId) {
2941
3430
  super(
2942
- `ACCESS_DENIED: ${body.message}`
3431
+ `ACCESS_DENIED: ${body.message}${traceId ? `
3432
+ TraceId: ${traceId}` : ""}`
2943
3433
  );
2944
3434
  this.body = body;
3435
+ this.traceId = traceId;
2945
3436
  this.name = "AccessDeniedError";
2946
3437
  }
2947
3438
  static code = "ACCESS_DENIED";
@@ -2949,11 +3440,13 @@ class AccessDeniedError extends Error {
2949
3440
  static description = `VM access denied`;
2950
3441
  }
2951
3442
  class PermissionAlreadyExistsError extends Error {
2952
- constructor(body) {
3443
+ constructor(body, traceId) {
2953
3444
  super(
2954
- `PERMISSION_ALREADY_EXISTS: ${body.message}`
3445
+ `PERMISSION_ALREADY_EXISTS: ${body.message}${traceId ? `
3446
+ TraceId: ${traceId}` : ""}`
2955
3447
  );
2956
3448
  this.body = body;
3449
+ this.traceId = traceId;
2957
3450
  this.name = "PermissionAlreadyExistsError";
2958
3451
  }
2959
3452
  static code = "PERMISSION_ALREADY_EXISTS";
@@ -2961,11 +3454,13 @@ class PermissionAlreadyExistsError extends Error {
2961
3454
  static description = `Permission already exists`;
2962
3455
  }
2963
3456
  class ListTokensFailedError extends Error {
2964
- constructor(body) {
3457
+ constructor(body, traceId) {
2965
3458
  super(
2966
- `LIST_TOKENS_FAILED: ${body.message}`
3459
+ `LIST_TOKENS_FAILED: ${body.message}${traceId ? `
3460
+ TraceId: ${traceId}` : ""}`
2967
3461
  );
2968
3462
  this.body = body;
3463
+ this.traceId = traceId;
2969
3464
  this.name = "ListTokensFailedError";
2970
3465
  }
2971
3466
  static code = "LIST_TOKENS_FAILED";
@@ -2973,11 +3468,13 @@ class ListTokensFailedError extends Error {
2973
3468
  static description = `Failed to list tokens: {message}`;
2974
3469
  }
2975
3470
  class RevokeTokenFailedError extends Error {
2976
- constructor(body) {
3471
+ constructor(body, traceId) {
2977
3472
  super(
2978
- `REVOKE_TOKEN_FAILED: ${body.message}`
3473
+ `REVOKE_TOKEN_FAILED: ${body.message}${traceId ? `
3474
+ TraceId: ${traceId}` : ""}`
2979
3475
  );
2980
3476
  this.body = body;
3477
+ this.traceId = traceId;
2981
3478
  this.name = "RevokeTokenFailedError";
2982
3479
  }
2983
3480
  static code = "REVOKE_TOKEN_FAILED";
@@ -2985,11 +3482,13 @@ class RevokeTokenFailedError extends Error {
2985
3482
  static description = `Failed to revoke token: {message}`;
2986
3483
  }
2987
3484
  class CreateTokenFailedError extends Error {
2988
- constructor(body) {
3485
+ constructor(body, traceId) {
2989
3486
  super(
2990
- `CREATE_TOKEN_FAILED: ${body.message}`
3487
+ `CREATE_TOKEN_FAILED: ${body.message}${traceId ? `
3488
+ TraceId: ${traceId}` : ""}`
2991
3489
  );
2992
3490
  this.body = body;
3491
+ this.traceId = traceId;
2993
3492
  this.name = "CreateTokenFailedError";
2994
3493
  }
2995
3494
  static code = "CREATE_TOKEN_FAILED";
@@ -2997,11 +3496,13 @@ class CreateTokenFailedError extends Error {
2997
3496
  static description = `Failed to create token: {message}`;
2998
3497
  }
2999
3498
  class ListPermissionsFailedError extends Error {
3000
- constructor(body) {
3499
+ constructor(body, traceId) {
3001
3500
  super(
3002
- `LIST_PERMISSIONS_FAILED: ${body.message}`
3501
+ `LIST_PERMISSIONS_FAILED: ${body.message}${traceId ? `
3502
+ TraceId: ${traceId}` : ""}`
3003
3503
  );
3004
3504
  this.body = body;
3505
+ this.traceId = traceId;
3005
3506
  this.name = "ListPermissionsFailedError";
3006
3507
  }
3007
3508
  static code = "LIST_PERMISSIONS_FAILED";
@@ -3009,11 +3510,13 @@ class ListPermissionsFailedError extends Error {
3009
3510
  static description = `Failed to list permissions: {message}`;
3010
3511
  }
3011
3512
  class GetPermissionFailedError extends Error {
3012
- constructor(body) {
3513
+ constructor(body, traceId) {
3013
3514
  super(
3014
- `GET_PERMISSION_FAILED: ${body.message}`
3515
+ `GET_PERMISSION_FAILED: ${body.message}${traceId ? `
3516
+ TraceId: ${traceId}` : ""}`
3015
3517
  );
3016
3518
  this.body = body;
3519
+ this.traceId = traceId;
3017
3520
  this.name = "GetPermissionFailedError";
3018
3521
  }
3019
3522
  static code = "GET_PERMISSION_FAILED";
@@ -3021,11 +3524,13 @@ class GetPermissionFailedError extends Error {
3021
3524
  static description = `Failed to get permission: {message}`;
3022
3525
  }
3023
3526
  class UpdatePermissionFailedError extends Error {
3024
- constructor(body) {
3527
+ constructor(body, traceId) {
3025
3528
  super(
3026
- `UPDATE_PERMISSION_FAILED: ${body.message}`
3529
+ `UPDATE_PERMISSION_FAILED: ${body.message}${traceId ? `
3530
+ TraceId: ${traceId}` : ""}`
3027
3531
  );
3028
3532
  this.body = body;
3533
+ this.traceId = traceId;
3029
3534
  this.name = "UpdatePermissionFailedError";
3030
3535
  }
3031
3536
  static code = "UPDATE_PERMISSION_FAILED";
@@ -3033,11 +3538,13 @@ class UpdatePermissionFailedError extends Error {
3033
3538
  static description = `Failed to update permission: {message}`;
3034
3539
  }
3035
3540
  class RevokePermissionFailedError extends Error {
3036
- constructor(body) {
3541
+ constructor(body, traceId) {
3037
3542
  super(
3038
- `REVOKE_PERMISSION_FAILED: ${body.message}`
3543
+ `REVOKE_PERMISSION_FAILED: ${body.message}${traceId ? `
3544
+ TraceId: ${traceId}` : ""}`
3039
3545
  );
3040
3546
  this.body = body;
3547
+ this.traceId = traceId;
3041
3548
  this.name = "RevokePermissionFailedError";
3042
3549
  }
3043
3550
  static code = "REVOKE_PERMISSION_FAILED";
@@ -3045,11 +3552,13 @@ class RevokePermissionFailedError extends Error {
3045
3552
  static description = `Failed to revoke permission: {message}`;
3046
3553
  }
3047
3554
  class GrantPermissionFailedError extends Error {
3048
- constructor(body) {
3555
+ constructor(body, traceId) {
3049
3556
  super(
3050
- `GRANT_PERMISSION_FAILED: ${body.message}`
3557
+ `GRANT_PERMISSION_FAILED: ${body.message}${traceId ? `
3558
+ TraceId: ${traceId}` : ""}`
3051
3559
  );
3052
3560
  this.body = body;
3561
+ this.traceId = traceId;
3053
3562
  this.name = "GrantPermissionFailedError";
3054
3563
  }
3055
3564
  static code = "GRANT_PERMISSION_FAILED";
@@ -3057,11 +3566,13 @@ class GrantPermissionFailedError extends Error {
3057
3566
  static description = `Failed to grant permission: {message}`;
3058
3567
  }
3059
3568
  class ListIdentitiesFailedError extends Error {
3060
- constructor(body) {
3569
+ constructor(body, traceId) {
3061
3570
  super(
3062
- `LIST_IDENTITIES_FAILED: ${body.message}`
3571
+ `LIST_IDENTITIES_FAILED: ${body.message}${traceId ? `
3572
+ TraceId: ${traceId}` : ""}`
3063
3573
  );
3064
3574
  this.body = body;
3575
+ this.traceId = traceId;
3065
3576
  this.name = "ListIdentitiesFailedError";
3066
3577
  }
3067
3578
  static code = "LIST_IDENTITIES_FAILED";
@@ -3069,11 +3580,13 @@ class ListIdentitiesFailedError extends Error {
3069
3580
  static description = `Failed to list identities: {message}`;
3070
3581
  }
3071
3582
  class DeleteIdentityFailedError extends Error {
3072
- constructor(body) {
3583
+ constructor(body, traceId) {
3073
3584
  super(
3074
- `DELETE_IDENTITY_FAILED: ${body.message}`
3585
+ `DELETE_IDENTITY_FAILED: ${body.message}${traceId ? `
3586
+ TraceId: ${traceId}` : ""}`
3075
3587
  );
3076
3588
  this.body = body;
3589
+ this.traceId = traceId;
3077
3590
  this.name = "DeleteIdentityFailedError";
3078
3591
  }
3079
3592
  static code = "DELETE_IDENTITY_FAILED";
@@ -3081,11 +3594,13 @@ class DeleteIdentityFailedError extends Error {
3081
3594
  static description = `Failed to delete identity: {message}`;
3082
3595
  }
3083
3596
  class CreateIdentityFailedError extends Error {
3084
- constructor(body) {
3597
+ constructor(body, traceId) {
3085
3598
  super(
3086
- `CREATE_IDENTITY_FAILED: ${body.message}`
3599
+ `CREATE_IDENTITY_FAILED: ${body.message}${traceId ? `
3600
+ TraceId: ${traceId}` : ""}`
3087
3601
  );
3088
3602
  this.body = body;
3603
+ this.traceId = traceId;
3089
3604
  this.name = "CreateIdentityFailedError";
3090
3605
  }
3091
3606
  static code = "CREATE_IDENTITY_FAILED";
@@ -3093,11 +3608,13 @@ class CreateIdentityFailedError extends Error {
3093
3608
  static description = `Failed to create identity: {message}`;
3094
3609
  }
3095
3610
  class VmPermissionNotFoundError extends Error {
3096
- constructor(body) {
3611
+ constructor(body, traceId) {
3097
3612
  super(
3098
- `VM_PERMISSION_NOT_FOUND: ${body.message}`
3613
+ `VM_PERMISSION_NOT_FOUND: ${body.message}${traceId ? `
3614
+ TraceId: ${traceId}` : ""}`
3099
3615
  );
3100
3616
  this.body = body;
3617
+ this.traceId = traceId;
3101
3618
  this.name = "VmPermissionNotFoundError";
3102
3619
  }
3103
3620
  static code = "VM_PERMISSION_NOT_FOUND";
@@ -3105,11 +3622,13 @@ class VmPermissionNotFoundError extends Error {
3105
3622
  static description = `VM permission not found`;
3106
3623
  }
3107
3624
  class PermissionNotFoundError extends Error {
3108
- constructor(body) {
3625
+ constructor(body, traceId) {
3109
3626
  super(
3110
- `PERMISSION_NOT_FOUND: ${body.message}`
3627
+ `PERMISSION_NOT_FOUND: ${body.message}${traceId ? `
3628
+ TraceId: ${traceId}` : ""}`
3111
3629
  );
3112
3630
  this.body = body;
3631
+ this.traceId = traceId;
3113
3632
  this.name = "PermissionNotFoundError";
3114
3633
  }
3115
3634
  static code = "PERMISSION_NOT_FOUND";
@@ -3117,11 +3636,13 @@ class PermissionNotFoundError extends Error {
3117
3636
  static description = `Permission not found`;
3118
3637
  }
3119
3638
  class GitRepositoryAccessDeniedError extends Error {
3120
- constructor(body) {
3639
+ constructor(body, traceId) {
3121
3640
  super(
3122
- `GIT_REPOSITORY_ACCESS_DENIED: ${body.message}`
3641
+ `GIT_REPOSITORY_ACCESS_DENIED: ${body.message}${traceId ? `
3642
+ TraceId: ${traceId}` : ""}`
3123
3643
  );
3124
3644
  this.body = body;
3645
+ this.traceId = traceId;
3125
3646
  this.name = "GitRepositoryAccessDeniedError";
3126
3647
  }
3127
3648
  static code = "GIT_REPOSITORY_ACCESS_DENIED";
@@ -3129,11 +3650,13 @@ class GitRepositoryAccessDeniedError extends Error {
3129
3650
  static description = `You are not allowed to access this repository`;
3130
3651
  }
3131
3652
  class GitRepositoryNotFoundError extends Error {
3132
- constructor(body) {
3653
+ constructor(body, traceId) {
3133
3654
  super(
3134
- `GIT_REPOSITORY_NOT_FOUND: ${body.message}`
3655
+ `GIT_REPOSITORY_NOT_FOUND: ${body.message}${traceId ? `
3656
+ TraceId: ${traceId}` : ""}`
3135
3657
  );
3136
3658
  this.body = body;
3659
+ this.traceId = traceId;
3137
3660
  this.name = "GitRepositoryNotFoundError";
3138
3661
  }
3139
3662
  static code = "GIT_REPOSITORY_NOT_FOUND";
@@ -3141,11 +3664,13 @@ class GitRepositoryNotFoundError extends Error {
3141
3664
  static description = `Repository not found`;
3142
3665
  }
3143
3666
  class CannotDeleteManagedIdentityError extends Error {
3144
- constructor(body) {
3667
+ constructor(body, traceId) {
3145
3668
  super(
3146
- `CANNOT_DELETE_MANAGED_IDENTITY: ${body.message}`
3669
+ `CANNOT_DELETE_MANAGED_IDENTITY: ${body.message}${traceId ? `
3670
+ TraceId: ${traceId}` : ""}`
3147
3671
  );
3148
3672
  this.body = body;
3673
+ this.traceId = traceId;
3149
3674
  this.name = "CannotDeleteManagedIdentityError";
3150
3675
  }
3151
3676
  static code = "CANNOT_DELETE_MANAGED_IDENTITY";
@@ -3153,11 +3678,13 @@ class CannotDeleteManagedIdentityError extends Error {
3153
3678
  static description = `Cannot delete managed identities`;
3154
3679
  }
3155
3680
  class CannotModifyManagedIdentityError extends Error {
3156
- constructor(body) {
3681
+ constructor(body, traceId) {
3157
3682
  super(
3158
- `CANNOT_MODIFY_MANAGED_IDENTITY: ${body.message}`
3683
+ `CANNOT_MODIFY_MANAGED_IDENTITY: ${body.message}${traceId ? `
3684
+ TraceId: ${traceId}` : ""}`
3159
3685
  );
3160
3686
  this.body = body;
3687
+ this.traceId = traceId;
3161
3688
  this.name = "CannotModifyManagedIdentityError";
3162
3689
  }
3163
3690
  static code = "CANNOT_MODIFY_MANAGED_IDENTITY";
@@ -3165,11 +3692,13 @@ class CannotModifyManagedIdentityError extends Error {
3165
3692
  static description = `Cannot modify managed identities`;
3166
3693
  }
3167
3694
  class IdentityAccessDeniedError extends Error {
3168
- constructor(body) {
3695
+ constructor(body, traceId) {
3169
3696
  super(
3170
- `IDENTITY_ACCESS_DENIED: ${body.message}`
3697
+ `IDENTITY_ACCESS_DENIED: ${body.message}${traceId ? `
3698
+ TraceId: ${traceId}` : ""}`
3171
3699
  );
3172
3700
  this.body = body;
3701
+ this.traceId = traceId;
3173
3702
  this.name = "IdentityAccessDeniedError";
3174
3703
  }
3175
3704
  static code = "IDENTITY_ACCESS_DENIED";
@@ -3177,11 +3706,13 @@ class IdentityAccessDeniedError extends Error {
3177
3706
  static description = `You are not allowed to access this identity`;
3178
3707
  }
3179
3708
  class IdentityNotFoundError extends Error {
3180
- constructor(body) {
3709
+ constructor(body, traceId) {
3181
3710
  super(
3182
- `IDENTITY_NOT_FOUND: ${body.message}`
3711
+ `IDENTITY_NOT_FOUND: ${body.message}${traceId ? `
3712
+ TraceId: ${traceId}` : ""}`
3183
3713
  );
3184
3714
  this.body = body;
3715
+ this.traceId = traceId;
3185
3716
  this.name = "IdentityNotFoundError";
3186
3717
  }
3187
3718
  static code = "IDENTITY_NOT_FOUND";
@@ -3189,11 +3720,13 @@ class IdentityNotFoundError extends Error {
3189
3720
  static description = `Identity not found`;
3190
3721
  }
3191
3722
  class ExecuteInternalErrorError extends Error {
3192
- constructor(body) {
3723
+ constructor(body, traceId) {
3193
3724
  super(
3194
- `EXECUTE_INTERNAL_ERROR: ${body.message}`
3725
+ `EXECUTE_INTERNAL_ERROR: ${body.message}${traceId ? `
3726
+ TraceId: ${traceId}` : ""}`
3195
3727
  );
3196
3728
  this.body = body;
3729
+ this.traceId = traceId;
3197
3730
  this.name = "ExecuteInternalErrorError";
3198
3731
  }
3199
3732
  static code = "EXECUTE_INTERNAL_ERROR";
@@ -3201,11 +3734,13 @@ class ExecuteInternalErrorError extends Error {
3201
3734
  static description = `Internal error: {message}`;
3202
3735
  }
3203
3736
  class ExecuteAccessDeniedError extends Error {
3204
- constructor(body) {
3737
+ constructor(body, traceId) {
3205
3738
  super(
3206
- `EXECUTE_ACCESS_DENIED: ${body.message}`
3739
+ `EXECUTE_ACCESS_DENIED: ${body.message}${traceId ? `
3740
+ TraceId: ${traceId}` : ""}`
3207
3741
  );
3208
3742
  this.body = body;
3743
+ this.traceId = traceId;
3209
3744
  this.name = "ExecuteAccessDeniedError";
3210
3745
  }
3211
3746
  static code = "EXECUTE_ACCESS_DENIED";
@@ -3213,11 +3748,13 @@ class ExecuteAccessDeniedError extends Error {
3213
3748
  static description = `Access denied to execute run`;
3214
3749
  }
3215
3750
  class ListRunsFailedError extends Error {
3216
- constructor(body) {
3751
+ constructor(body, traceId) {
3217
3752
  super(
3218
- `LIST_RUNS_FAILED: ${body.message}`
3753
+ `LIST_RUNS_FAILED: ${body.message}${traceId ? `
3754
+ TraceId: ${traceId}` : ""}`
3219
3755
  );
3220
3756
  this.body = body;
3757
+ this.traceId = traceId;
3221
3758
  this.name = "ListRunsFailedError";
3222
3759
  }
3223
3760
  static code = "LIST_RUNS_FAILED";
@@ -3225,11 +3762,13 @@ class ListRunsFailedError extends Error {
3225
3762
  static description = `Failed to list execute runs: {message}`;
3226
3763
  }
3227
3764
  class ExecutionErrorError extends Error {
3228
- constructor(body) {
3765
+ constructor(body, traceId) {
3229
3766
  super(
3230
- `EXECUTION_ERROR: ${body.message}`
3767
+ `EXECUTION_ERROR: ${body.message}${traceId ? `
3768
+ TraceId: ${traceId}` : ""}`
3231
3769
  );
3232
3770
  this.body = body;
3771
+ this.traceId = traceId;
3233
3772
  this.name = "ExecutionErrorError";
3234
3773
  }
3235
3774
  static code = "EXECUTION_ERROR";
@@ -3237,11 +3776,13 @@ class ExecutionErrorError extends Error {
3237
3776
  static description = `Script execution error: {message}`;
3238
3777
  }
3239
3778
  class ConnectionFailedError extends Error {
3240
- constructor(body) {
3779
+ constructor(body, traceId) {
3241
3780
  super(
3242
- `CONNECTION_FAILED: ${body.message}`
3781
+ `CONNECTION_FAILED: ${body.message}${traceId ? `
3782
+ TraceId: ${traceId}` : ""}`
3243
3783
  );
3244
3784
  this.body = body;
3785
+ this.traceId = traceId;
3245
3786
  this.name = "ConnectionFailedError";
3246
3787
  }
3247
3788
  static code = "CONNECTION_FAILED";
@@ -3249,11 +3790,13 @@ class ConnectionFailedError extends Error {
3249
3790
  static description = `Failed to connect to execute server: {message}`;
3250
3791
  }
3251
3792
  class MetadataWriteFailedError extends Error {
3252
- constructor(body) {
3793
+ constructor(body, traceId) {
3253
3794
  super(
3254
- `METADATA_WRITE_FAILED: ${body.message}`
3795
+ `METADATA_WRITE_FAILED: ${body.message}${traceId ? `
3796
+ TraceId: ${traceId}` : ""}`
3255
3797
  );
3256
3798
  this.body = body;
3799
+ this.traceId = traceId;
3257
3800
  this.name = "MetadataWriteFailedError";
3258
3801
  }
3259
3802
  static code = "METADATA_WRITE_FAILED";
@@ -3261,11 +3804,13 @@ class MetadataWriteFailedError extends Error {
3261
3804
  static description = `Failed to write metadata file: {message}`;
3262
3805
  }
3263
3806
  class NodeModulesInstallFailedError extends Error {
3264
- constructor(body) {
3807
+ constructor(body, traceId) {
3265
3808
  super(
3266
- `NODE_MODULES_INSTALL_FAILED: ${body.message}`
3809
+ `NODE_MODULES_INSTALL_FAILED: ${body.message}${traceId ? `
3810
+ TraceId: ${traceId}` : ""}`
3267
3811
  );
3268
3812
  this.body = body;
3813
+ this.traceId = traceId;
3269
3814
  this.name = "NodeModulesInstallFailedError";
3270
3815
  }
3271
3816
  static code = "NODE_MODULES_INSTALL_FAILED";
@@ -3273,11 +3818,13 @@ class NodeModulesInstallFailedError extends Error {
3273
3818
  static description = `Failed to install node modules: {message}`;
3274
3819
  }
3275
3820
  class NodeModulesDownloadFailedError extends Error {
3276
- constructor(body) {
3821
+ constructor(body, traceId) {
3277
3822
  super(
3278
- `NODE_MODULES_DOWNLOAD_FAILED: ${body.message}`
3823
+ `NODE_MODULES_DOWNLOAD_FAILED: ${body.message}${traceId ? `
3824
+ TraceId: ${traceId}` : ""}`
3279
3825
  );
3280
3826
  this.body = body;
3827
+ this.traceId = traceId;
3281
3828
  this.name = "NodeModulesDownloadFailedError";
3282
3829
  }
3283
3830
  static code = "NODE_MODULES_DOWNLOAD_FAILED";
@@ -3285,11 +3832,13 @@ class NodeModulesDownloadFailedError extends Error {
3285
3832
  static description = `Failed to download node modules: {message}`;
3286
3833
  }
3287
3834
  class LockGenerationFailedError extends Error {
3288
- constructor(body) {
3835
+ constructor(body, traceId) {
3289
3836
  super(
3290
- `LOCK_GENERATION_FAILED: ${body.message}`
3837
+ `LOCK_GENERATION_FAILED: ${body.message}${traceId ? `
3838
+ TraceId: ${traceId}` : ""}`
3291
3839
  );
3292
3840
  this.body = body;
3841
+ this.traceId = traceId;
3293
3842
  this.name = "LockGenerationFailedError";
3294
3843
  }
3295
3844
  static code = "LOCK_GENERATION_FAILED";
@@ -3297,11 +3846,13 @@ class LockGenerationFailedError extends Error {
3297
3846
  static description = `Failed to generate lock file: {message}`;
3298
3847
  }
3299
3848
  class WriteScriptFailedError extends Error {
3300
- constructor(body) {
3849
+ constructor(body, traceId) {
3301
3850
  super(
3302
- `WRITE_SCRIPT_FAILED: ${body.message}`
3851
+ `WRITE_SCRIPT_FAILED: ${body.message}${traceId ? `
3852
+ TraceId: ${traceId}` : ""}`
3303
3853
  );
3304
3854
  this.body = body;
3855
+ this.traceId = traceId;
3305
3856
  this.name = "WriteScriptFailedError";
3306
3857
  }
3307
3858
  static code = "WRITE_SCRIPT_FAILED";
@@ -3309,11 +3860,13 @@ class WriteScriptFailedError extends Error {
3309
3860
  static description = `Failed to write script file: {message}`;
3310
3861
  }
3311
3862
  class DirectoryCreationFailedError extends Error {
3312
- constructor(body) {
3863
+ constructor(body, traceId) {
3313
3864
  super(
3314
- `DIRECTORY_CREATION_FAILED: ${body.message}`
3865
+ `DIRECTORY_CREATION_FAILED: ${body.message}${traceId ? `
3866
+ TraceId: ${traceId}` : ""}`
3315
3867
  );
3316
3868
  this.body = body;
3869
+ this.traceId = traceId;
3317
3870
  this.name = "DirectoryCreationFailedError";
3318
3871
  }
3319
3872
  static code = "DIRECTORY_CREATION_FAILED";
@@ -3321,11 +3874,13 @@ class DirectoryCreationFailedError extends Error {
3321
3874
  static description = `Failed to create script directory: {message}`;
3322
3875
  }
3323
3876
  class NetworkPermissionsFailedError extends Error {
3324
- constructor(body) {
3877
+ constructor(body, traceId) {
3325
3878
  super(
3326
- `NETWORK_PERMISSIONS_FAILED: ${body.message}`
3879
+ `NETWORK_PERMISSIONS_FAILED: ${body.message}${traceId ? `
3880
+ TraceId: ${traceId}` : ""}`
3327
3881
  );
3328
3882
  this.body = body;
3883
+ this.traceId = traceId;
3329
3884
  this.name = "NetworkPermissionsFailedError";
3330
3885
  }
3331
3886
  static code = "NETWORK_PERMISSIONS_FAILED";
@@ -3333,11 +3888,13 @@ class NetworkPermissionsFailedError extends Error {
3333
3888
  static description = `Failed to insert network permissions: {message}`;
3334
3889
  }
3335
3890
  class LoggingFailedError extends Error {
3336
- constructor(body) {
3891
+ constructor(body, traceId) {
3337
3892
  super(
3338
- `LOGGING_FAILED: ${body.message}`
3893
+ `LOGGING_FAILED: ${body.message}${traceId ? `
3894
+ TraceId: ${traceId}` : ""}`
3339
3895
  );
3340
3896
  this.body = body;
3897
+ this.traceId = traceId;
3341
3898
  this.name = "LoggingFailedError";
3342
3899
  }
3343
3900
  static code = "LOGGING_FAILED";
@@ -3345,11 +3902,13 @@ class LoggingFailedError extends Error {
3345
3902
  static description = `Failed to log execute run: {message}`;
3346
3903
  }
3347
3904
  class RunNotFoundError extends Error {
3348
- constructor(body) {
3905
+ constructor(body, traceId) {
3349
3906
  super(
3350
- `RUN_NOT_FOUND: ${body.message}`
3907
+ `RUN_NOT_FOUND: ${body.message}${traceId ? `
3908
+ TraceId: ${traceId}` : ""}`
3351
3909
  );
3352
3910
  this.body = body;
3911
+ this.traceId = traceId;
3353
3912
  this.name = "RunNotFoundError";
3354
3913
  }
3355
3914
  static code = "RUN_NOT_FOUND";
@@ -3357,11 +3916,13 @@ class RunNotFoundError extends Error {
3357
3916
  static description = `Execute run not found: {run_id}`;
3358
3917
  }
3359
3918
  class LimitExceededError extends Error {
3360
- constructor(body) {
3919
+ constructor(body, traceId) {
3361
3920
  super(
3362
- `LIMIT_EXCEEDED: ${body.message}`
3921
+ `LIMIT_EXCEEDED: ${body.message}${traceId ? `
3922
+ TraceId: ${traceId}` : ""}`
3363
3923
  );
3364
3924
  this.body = body;
3925
+ this.traceId = traceId;
3365
3926
  this.name = "LimitExceededError";
3366
3927
  }
3367
3928
  static code = "LIMIT_EXCEEDED";
@@ -3369,11 +3930,13 @@ class LimitExceededError extends Error {
3369
3930
  static description = `Managed domains limit exceeded: your plan allows {limit} verified domains, you have {current}`;
3370
3931
  }
3371
3932
  class FailedToProvisionCertificateError extends Error {
3372
- constructor(body) {
3933
+ constructor(body, traceId) {
3373
3934
  super(
3374
- `FAILED_TO_PROVISION_CERTIFICATE: ${body.message}`
3935
+ `FAILED_TO_PROVISION_CERTIFICATE: ${body.message}${traceId ? `
3936
+ TraceId: ${traceId}` : ""}`
3375
3937
  );
3376
3938
  this.body = body;
3939
+ this.traceId = traceId;
3377
3940
  this.name = "FailedToProvisionCertificateError";
3378
3941
  }
3379
3942
  static code = "FAILED_TO_PROVISION_CERTIFICATE";
@@ -3381,11 +3944,13 @@ class FailedToProvisionCertificateError extends Error {
3381
3944
  static description = `Failed to provision certificate: {message}`;
3382
3945
  }
3383
3946
  class FailedToInsertDomainMappingError extends Error {
3384
- constructor(body) {
3947
+ constructor(body, traceId) {
3385
3948
  super(
3386
- `FAILED_TO_INSERT_DOMAIN_MAPPING: ${body.message}`
3949
+ `FAILED_TO_INSERT_DOMAIN_MAPPING: ${body.message}${traceId ? `
3950
+ TraceId: ${traceId}` : ""}`
3387
3951
  );
3388
3952
  this.body = body;
3953
+ this.traceId = traceId;
3389
3954
  this.name = "FailedToInsertDomainMappingError";
3390
3955
  }
3391
3956
  static code = "FAILED_TO_INSERT_DOMAIN_MAPPING";
@@ -3393,11 +3958,13 @@ class FailedToInsertDomainMappingError extends Error {
3393
3958
  static description = `Failed to insert domain mapping: {message}`;
3394
3959
  }
3395
3960
  class PermissionDeniedError extends Error {
3396
- constructor(body) {
3961
+ constructor(body, traceId) {
3397
3962
  super(
3398
- `PERMISSION_DENIED: ${body.message}`
3963
+ `PERMISSION_DENIED: ${body.message}${traceId ? `
3964
+ TraceId: ${traceId}` : ""}`
3399
3965
  );
3400
3966
  this.body = body;
3967
+ this.traceId = traceId;
3401
3968
  this.name = "PermissionDeniedError";
3402
3969
  }
3403
3970
  static code = "PERMISSION_DENIED";
@@ -3405,11 +3972,13 @@ class PermissionDeniedError extends Error {
3405
3972
  static description = `Permission denied: {message}`;
3406
3973
  }
3407
3974
  class FailedToCheckPermissionsError extends Error {
3408
- constructor(body) {
3975
+ constructor(body, traceId) {
3409
3976
  super(
3410
- `FAILED_TO_CHECK_PERMISSIONS: ${body.message}`
3977
+ `FAILED_TO_CHECK_PERMISSIONS: ${body.message}${traceId ? `
3978
+ TraceId: ${traceId}` : ""}`
3411
3979
  );
3412
3980
  this.body = body;
3981
+ this.traceId = traceId;
3413
3982
  this.name = "FailedToCheckPermissionsError";
3414
3983
  }
3415
3984
  static code = "FAILED_TO_CHECK_PERMISSIONS";
@@ -3417,11 +3986,13 @@ class FailedToCheckPermissionsError extends Error {
3417
3986
  static description = `Failed to check permissions: {message}`;
3418
3987
  }
3419
3988
  class FailedToListDomainsError extends Error {
3420
- constructor(body) {
3989
+ constructor(body, traceId) {
3421
3990
  super(
3422
- `FAILED_TO_LIST_DOMAINS: ${body.message}`
3991
+ `FAILED_TO_LIST_DOMAINS: ${body.message}${traceId ? `
3992
+ TraceId: ${traceId}` : ""}`
3423
3993
  );
3424
3994
  this.body = body;
3995
+ this.traceId = traceId;
3425
3996
  this.name = "FailedToListDomainsError";
3426
3997
  }
3427
3998
  static code = "FAILED_TO_LIST_DOMAINS";
@@ -3429,11 +4000,13 @@ class FailedToListDomainsError extends Error {
3429
4000
  static description = `Failed to list domains: {message}`;
3430
4001
  }
3431
4002
  class FailedToListVerificationsError extends Error {
3432
- constructor(body) {
4003
+ constructor(body, traceId) {
3433
4004
  super(
3434
- `FAILED_TO_LIST_VERIFICATIONS: ${body.message}`
4005
+ `FAILED_TO_LIST_VERIFICATIONS: ${body.message}${traceId ? `
4006
+ TraceId: ${traceId}` : ""}`
3435
4007
  );
3436
4008
  this.body = body;
4009
+ this.traceId = traceId;
3437
4010
  this.name = "FailedToListVerificationsError";
3438
4011
  }
3439
4012
  static code = "FAILED_TO_LIST_VERIFICATIONS";
@@ -3441,11 +4014,13 @@ class FailedToListVerificationsError extends Error {
3441
4014
  static description = `Failed to list verifications: {message}`;
3442
4015
  }
3443
4016
  class FailedToVerifyDomainError extends Error {
3444
- constructor(body) {
4017
+ constructor(body, traceId) {
3445
4018
  super(
3446
- `FAILED_TO_VERIFY_DOMAIN: ${body.message}`
4019
+ `FAILED_TO_VERIFY_DOMAIN: ${body.message}${traceId ? `
4020
+ TraceId: ${traceId}` : ""}`
3447
4021
  );
3448
4022
  this.body = body;
4023
+ this.traceId = traceId;
3449
4024
  this.name = "FailedToVerifyDomainError";
3450
4025
  }
3451
4026
  static code = "FAILED_TO_VERIFY_DOMAIN";
@@ -3453,11 +4028,13 @@ class FailedToVerifyDomainError extends Error {
3453
4028
  static description = `Failed to verify domain: {message}`;
3454
4029
  }
3455
4030
  class VerificationFailedError extends Error {
3456
- constructor(body) {
4031
+ constructor(body, traceId) {
3457
4032
  super(
3458
- `VERIFICATION_FAILED: ${body.message}`
4033
+ `VERIFICATION_FAILED: ${body.message}${traceId ? `
4034
+ TraceId: ${traceId}` : ""}`
3459
4035
  );
3460
4036
  this.body = body;
4037
+ this.traceId = traceId;
3461
4038
  this.name = "VerificationFailedError";
3462
4039
  }
3463
4040
  static code = "VERIFICATION_FAILED";
@@ -3465,11 +4042,13 @@ class VerificationFailedError extends Error {
3465
4042
  static description = `Domain verification failed: {message}`;
3466
4043
  }
3467
4044
  class FailedToDeleteVerificationError extends Error {
3468
- constructor(body) {
4045
+ constructor(body, traceId) {
3469
4046
  super(
3470
- `FAILED_TO_DELETE_VERIFICATION: ${body.message}`
4047
+ `FAILED_TO_DELETE_VERIFICATION: ${body.message}${traceId ? `
4048
+ TraceId: ${traceId}` : ""}`
3471
4049
  );
3472
4050
  this.body = body;
4051
+ this.traceId = traceId;
3473
4052
  this.name = "FailedToDeleteVerificationError";
3474
4053
  }
3475
4054
  static code = "FAILED_TO_DELETE_VERIFICATION";
@@ -3477,11 +4056,13 @@ class FailedToDeleteVerificationError extends Error {
3477
4056
  static description = `Failed to delete verification: {message}`;
3478
4057
  }
3479
4058
  class VerificationNotFoundError extends Error {
3480
- constructor(body) {
4059
+ constructor(body, traceId) {
3481
4060
  super(
3482
- `VERIFICATION_NOT_FOUND: ${body.message}`
4061
+ `VERIFICATION_NOT_FOUND: ${body.message}${traceId ? `
4062
+ TraceId: ${traceId}` : ""}`
3483
4063
  );
3484
4064
  this.body = body;
4065
+ this.traceId = traceId;
3485
4066
  this.name = "VerificationNotFoundError";
3486
4067
  }
3487
4068
  static code = "VERIFICATION_NOT_FOUND";
@@ -3489,11 +4070,13 @@ class VerificationNotFoundError extends Error {
3489
4070
  static description = `Verification request not found for domain: {domain}`;
3490
4071
  }
3491
4072
  class FailedToCreateVerificationCodeError extends Error {
3492
- constructor(body) {
4073
+ constructor(body, traceId) {
3493
4074
  super(
3494
- `FAILED_TO_CREATE_VERIFICATION_CODE: ${body.message}`
4075
+ `FAILED_TO_CREATE_VERIFICATION_CODE: ${body.message}${traceId ? `
4076
+ TraceId: ${traceId}` : ""}`
3495
4077
  );
3496
4078
  this.body = body;
4079
+ this.traceId = traceId;
3497
4080
  this.name = "FailedToCreateVerificationCodeError";
3498
4081
  }
3499
4082
  static code = "FAILED_TO_CREATE_VERIFICATION_CODE";
@@ -3501,11 +4084,13 @@ class FailedToCreateVerificationCodeError extends Error {
3501
4084
  static description = `Failed to create verification code: {message}`;
3502
4085
  }
3503
4086
  class InvalidDomainError extends Error {
3504
- constructor(body) {
4087
+ constructor(body, traceId) {
3505
4088
  super(
3506
- `INVALID_DOMAIN: ${body.message}`
4089
+ `INVALID_DOMAIN: ${body.message}${traceId ? `
4090
+ TraceId: ${traceId}` : ""}`
3507
4091
  );
3508
4092
  this.body = body;
4093
+ this.traceId = traceId;
3509
4094
  this.name = "InvalidDomainError";
3510
4095
  }
3511
4096
  static code = "INVALID_DOMAIN";
@@ -3513,11 +4098,13 @@ class InvalidDomainError extends Error {
3513
4098
  static description = `Invalid domain: {domain}`;
3514
4099
  }
3515
4100
  class CloudstateInternalErrorError extends Error {
3516
- constructor(body) {
4101
+ constructor(body, traceId) {
3517
4102
  super(
3518
- `CLOUDSTATE_INTERNAL_ERROR: ${body.message}`
4103
+ `CLOUDSTATE_INTERNAL_ERROR: ${body.message}${traceId ? `
4104
+ TraceId: ${traceId}` : ""}`
3519
4105
  );
3520
4106
  this.body = body;
4107
+ this.traceId = traceId;
3521
4108
  this.name = "CloudstateInternalErrorError";
3522
4109
  }
3523
4110
  static code = "CLOUDSTATE_INTERNAL_ERROR";
@@ -3525,11 +4112,13 @@ class CloudstateInternalErrorError extends Error {
3525
4112
  static description = `Internal error: {message}`;
3526
4113
  }
3527
4114
  class CloudstateDatabaseErrorError extends Error {
3528
- constructor(body) {
4115
+ constructor(body, traceId) {
3529
4116
  super(
3530
- `CLOUDSTATE_DATABASE_ERROR: ${body.message}`
4117
+ `CLOUDSTATE_DATABASE_ERROR: ${body.message}${traceId ? `
4118
+ TraceId: ${traceId}` : ""}`
3531
4119
  );
3532
4120
  this.body = body;
4121
+ this.traceId = traceId;
3533
4122
  this.name = "CloudstateDatabaseErrorError";
3534
4123
  }
3535
4124
  static code = "CLOUDSTATE_DATABASE_ERROR";
@@ -3537,11 +4126,13 @@ class CloudstateDatabaseErrorError extends Error {
3537
4126
  static description = `Database operation failed: {message}`;
3538
4127
  }
3539
4128
  class CloudstateAccessDeniedError extends Error {
3540
- constructor(body) {
4129
+ constructor(body, traceId) {
3541
4130
  super(
3542
- `CLOUDSTATE_ACCESS_DENIED: ${body.message}`
4131
+ `CLOUDSTATE_ACCESS_DENIED: ${body.message}${traceId ? `
4132
+ TraceId: ${traceId}` : ""}`
3543
4133
  );
3544
4134
  this.body = body;
4135
+ this.traceId = traceId;
3545
4136
  this.name = "CloudstateAccessDeniedError";
3546
4137
  }
3547
4138
  static code = "CLOUDSTATE_ACCESS_DENIED";
@@ -3549,11 +4140,13 @@ class CloudstateAccessDeniedError extends Error {
3549
4140
  static description = `Access denied to project: {project_id}`;
3550
4141
  }
3551
4142
  class RestoreFailedError extends Error {
3552
- constructor(body) {
4143
+ constructor(body, traceId) {
3553
4144
  super(
3554
- `RESTORE_FAILED: ${body.message}`
4145
+ `RESTORE_FAILED: ${body.message}${traceId ? `
4146
+ TraceId: ${traceId}` : ""}`
3555
4147
  );
3556
4148
  this.body = body;
4149
+ this.traceId = traceId;
3557
4150
  this.name = "RestoreFailedError";
3558
4151
  }
3559
4152
  static code = "RESTORE_FAILED";
@@ -3561,11 +4154,13 @@ class RestoreFailedError extends Error {
3561
4154
  static description = `Failed to restore from backup: {message}`;
3562
4155
  }
3563
4156
  class CreateBackupFailedError extends Error {
3564
- constructor(body) {
4157
+ constructor(body, traceId) {
3565
4158
  super(
3566
- `CREATE_BACKUP_FAILED: ${body.message}`
4159
+ `CREATE_BACKUP_FAILED: ${body.message}${traceId ? `
4160
+ TraceId: ${traceId}` : ""}`
3567
4161
  );
3568
4162
  this.body = body;
4163
+ this.traceId = traceId;
3569
4164
  this.name = "CreateBackupFailedError";
3570
4165
  }
3571
4166
  static code = "CREATE_BACKUP_FAILED";
@@ -3573,11 +4168,13 @@ class CreateBackupFailedError extends Error {
3573
4168
  static description = `Failed to create backup: {message}`;
3574
4169
  }
3575
4170
  class BackupFailedError extends Error {
3576
- constructor(body) {
4171
+ constructor(body, traceId) {
3577
4172
  super(
3578
- `BACKUP_FAILED: ${body.message}`
4173
+ `BACKUP_FAILED: ${body.message}${traceId ? `
4174
+ TraceId: ${traceId}` : ""}`
3579
4175
  );
3580
4176
  this.body = body;
4177
+ this.traceId = traceId;
3581
4178
  this.name = "BackupFailedError";
3582
4179
  }
3583
4180
  static code = "BACKUP_FAILED";
@@ -3585,11 +4182,13 @@ class BackupFailedError extends Error {
3585
4182
  static description = `Backup failed: {message}`;
3586
4183
  }
3587
4184
  class DeploymentFailedError extends Error {
3588
- constructor(body) {
4185
+ constructor(body, traceId) {
3589
4186
  super(
3590
- `DEPLOYMENT_FAILED: ${body.message}`
4187
+ `DEPLOYMENT_FAILED: ${body.message}${traceId ? `
4188
+ TraceId: ${traceId}` : ""}`
3591
4189
  );
3592
4190
  this.body = body;
4191
+ this.traceId = traceId;
3593
4192
  this.name = "DeploymentFailedError";
3594
4193
  }
3595
4194
  static code = "DEPLOYMENT_FAILED";
@@ -3597,11 +4196,13 @@ class DeploymentFailedError extends Error {
3597
4196
  static description = `Deployment failed: {message}`;
3598
4197
  }
3599
4198
  class InvalidDeploymentRequestError extends Error {
3600
- constructor(body) {
4199
+ constructor(body, traceId) {
3601
4200
  super(
3602
- `INVALID_DEPLOYMENT_REQUEST: ${body.message}`
4201
+ `INVALID_DEPLOYMENT_REQUEST: ${body.message}${traceId ? `
4202
+ TraceId: ${traceId}` : ""}`
3603
4203
  );
3604
4204
  this.body = body;
4205
+ this.traceId = traceId;
3605
4206
  this.name = "InvalidDeploymentRequestError";
3606
4207
  }
3607
4208
  static code = "INVALID_DEPLOYMENT_REQUEST";
@@ -3609,11 +4210,13 @@ class InvalidDeploymentRequestError extends Error {
3609
4210
  static description = `Invalid deployment request: {message}`;
3610
4211
  }
3611
4212
  class ProjectNotFoundError extends Error {
3612
- constructor(body) {
4213
+ constructor(body, traceId) {
3613
4214
  super(
3614
- `PROJECT_NOT_FOUND: ${body.message}`
4215
+ `PROJECT_NOT_FOUND: ${body.message}${traceId ? `
4216
+ TraceId: ${traceId}` : ""}`
3615
4217
  );
3616
4218
  this.body = body;
4219
+ this.traceId = traceId;
3617
4220
  this.name = "ProjectNotFoundError";
3618
4221
  }
3619
4222
  static code = "PROJECT_NOT_FOUND";
@@ -3621,11 +4224,13 @@ class ProjectNotFoundError extends Error {
3621
4224
  static description = `Project not found: {project_id}`;
3622
4225
  }
3623
4226
  class GitRepoLimitExceededError extends Error {
3624
- constructor(body) {
4227
+ constructor(body, traceId) {
3625
4228
  super(
3626
- `GIT_REPO_LIMIT_EXCEEDED: ${body.message}`
4229
+ `GIT_REPO_LIMIT_EXCEEDED: ${body.message}${traceId ? `
4230
+ TraceId: ${traceId}` : ""}`
3627
4231
  );
3628
4232
  this.body = body;
4233
+ this.traceId = traceId;
3629
4234
  this.name = "GitRepoLimitExceededError";
3630
4235
  }
3631
4236
  static code = "GIT_REPO_LIMIT_EXCEEDED";
@@ -3633,11 +4238,13 @@ class GitRepoLimitExceededError extends Error {
3633
4238
  static description = `Repository limit exceeded: your plan allows {limit} repositories, you currently have {current}`;
3634
4239
  }
3635
4240
  class EmptyTagError extends Error {
3636
- constructor(body) {
4241
+ constructor(body, traceId) {
3637
4242
  super(
3638
- `EMPTY_TAG: ${body.message}`
4243
+ `EMPTY_TAG: ${body.message}${traceId ? `
4244
+ TraceId: ${traceId}` : ""}`
3639
4245
  );
3640
4246
  this.body = body;
4247
+ this.traceId = traceId;
3641
4248
  this.name = "EmptyTagError";
3642
4249
  }
3643
4250
  static code = "EMPTY_TAG";
@@ -4320,6 +4927,7 @@ class ApiClient {
4320
4927
  body: body ? JSON.stringify(body) : void 0
4321
4928
  });
4322
4929
  if (!response.ok) {
4930
+ const traceId = response.headers.get("x-freestyle-trace-id") ?? void 0;
4323
4931
  let errorText = await response.text();
4324
4932
  let errorData;
4325
4933
  try {
@@ -4328,9 +4936,10 @@ class ApiClient {
4328
4936
  if (response.status === 401) {
4329
4937
  errorText += " (Your API key or access token may be invalid.)";
4330
4938
  }
4331
- throw new Error(`HTTP error ${response.status}: ${errorText}. ${e}`);
4939
+ throw new Error(`HTTP error ${response.status}: ${errorText}. ${e}${traceId ? `
4940
+ TraceId: ${traceId}` : ""}`);
4332
4941
  }
4333
- throw errorFromJSON(errorData);
4942
+ throw errorFromJSON(errorData, traceId);
4334
4943
  }
4335
4944
  return response;
4336
4945
  }