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