freestyle 0.1.48 → 0.1.50
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.
- package/README.md +9 -0
- package/cli.mjs +830 -12
- package/index.cjs +2054 -1497
- package/index.d.cts +1961 -1234
- package/index.d.mts +1961 -1234
- package/index.mjs +2052 -1498
- package/package.json +1 -1
package/index.mjs
CHANGED
|
@@ -80,113 +80,245 @@ class BadKeyError extends Error {
|
|
|
80
80
|
static statusCode = 400;
|
|
81
81
|
static description = `invalid key length`;
|
|
82
82
|
}
|
|
83
|
-
class
|
|
83
|
+
class VmOperationDeniedDuringTransactionError extends Error {
|
|
84
84
|
constructor(body) {
|
|
85
85
|
super(
|
|
86
|
-
`
|
|
86
|
+
`VM_OPERATION_DENIED_DURING_TRANSACTION: ${body.message}`
|
|
87
87
|
);
|
|
88
88
|
this.body = body;
|
|
89
|
-
this.name = "
|
|
89
|
+
this.name = "VmOperationDeniedDuringTransactionError";
|
|
90
90
|
}
|
|
91
|
-
static code = "
|
|
92
|
-
static statusCode =
|
|
93
|
-
static description = `
|
|
91
|
+
static code = "VM_OPERATION_DENIED_DURING_TRANSACTION";
|
|
92
|
+
static statusCode = 409;
|
|
93
|
+
static description = `VM operation denied during active transaction for VM {vm_id} in transaction {transaction_id}`;
|
|
94
94
|
}
|
|
95
|
-
class
|
|
95
|
+
class VmTransactionIdMismatchError extends Error {
|
|
96
96
|
constructor(body) {
|
|
97
97
|
super(
|
|
98
|
-
`
|
|
98
|
+
`VM_TRANSACTION_ID_MISMATCH: ${body.message}`
|
|
99
99
|
);
|
|
100
100
|
this.body = body;
|
|
101
|
-
this.name = "
|
|
101
|
+
this.name = "VmTransactionIdMismatchError";
|
|
102
102
|
}
|
|
103
|
-
static code = "
|
|
103
|
+
static code = "VM_TRANSACTION_ID_MISMATCH";
|
|
104
104
|
static statusCode = 400;
|
|
105
|
-
static description = `
|
|
105
|
+
static description = `Transaction ID {provided_transaction_id} does not match the current VM transaction {expected_transaction_id} for VM {vm_id}`;
|
|
106
106
|
}
|
|
107
|
-
class
|
|
107
|
+
class VmNotInTransactionError extends Error {
|
|
108
108
|
constructor(body) {
|
|
109
109
|
super(
|
|
110
|
-
`
|
|
110
|
+
`VM_NOT_IN_TRANSACTION: ${body.message}`
|
|
111
111
|
);
|
|
112
112
|
this.body = body;
|
|
113
|
-
this.name = "
|
|
113
|
+
this.name = "VmNotInTransactionError";
|
|
114
114
|
}
|
|
115
|
-
static code = "
|
|
115
|
+
static code = "VM_NOT_IN_TRANSACTION";
|
|
116
|
+
static statusCode = 404;
|
|
117
|
+
static description = `VM not in a transaction: {vm_id}`;
|
|
118
|
+
}
|
|
119
|
+
class PartitionNotFoundError extends Error {
|
|
120
|
+
constructor(body) {
|
|
121
|
+
super(
|
|
122
|
+
`PARTITION_NOT_FOUND: ${body.message}`
|
|
123
|
+
);
|
|
124
|
+
this.body = body;
|
|
125
|
+
this.name = "PartitionNotFoundError";
|
|
126
|
+
}
|
|
127
|
+
static code = "PARTITION_NOT_FOUND";
|
|
128
|
+
static statusCode = 404;
|
|
129
|
+
static description = `Partition not found: {partition_id}`;
|
|
130
|
+
}
|
|
131
|
+
class UserNotFoundError extends Error {
|
|
132
|
+
constructor(body) {
|
|
133
|
+
super(
|
|
134
|
+
`USER_NOT_FOUND: ${body.message}`
|
|
135
|
+
);
|
|
136
|
+
this.body = body;
|
|
137
|
+
this.name = "UserNotFoundError";
|
|
138
|
+
}
|
|
139
|
+
static code = "USER_NOT_FOUND";
|
|
140
|
+
static statusCode = 404;
|
|
141
|
+
static description = `User not found: {user_name}`;
|
|
142
|
+
}
|
|
143
|
+
class UserAlreadyExistsError extends Error {
|
|
144
|
+
constructor(body) {
|
|
145
|
+
super(
|
|
146
|
+
`USER_ALREADY_EXISTS: ${body.message}`
|
|
147
|
+
);
|
|
148
|
+
this.body = body;
|
|
149
|
+
this.name = "UserAlreadyExistsError";
|
|
150
|
+
}
|
|
151
|
+
static code = "USER_ALREADY_EXISTS";
|
|
152
|
+
static statusCode = 409;
|
|
153
|
+
static description = `Conflict: User '{user_name}' already exists`;
|
|
154
|
+
}
|
|
155
|
+
class ValidationErrorError extends Error {
|
|
156
|
+
constructor(body) {
|
|
157
|
+
super(
|
|
158
|
+
`VALIDATION_ERROR: ${body.message}`
|
|
159
|
+
);
|
|
160
|
+
this.body = body;
|
|
161
|
+
this.name = "ValidationErrorError";
|
|
162
|
+
}
|
|
163
|
+
static code = "VALIDATION_ERROR";
|
|
116
164
|
static statusCode = 400;
|
|
117
|
-
static description = `
|
|
165
|
+
static description = `Validation error: {message}`;
|
|
118
166
|
}
|
|
119
|
-
class
|
|
167
|
+
class GroupNotFoundError extends Error {
|
|
120
168
|
constructor(body) {
|
|
121
169
|
super(
|
|
122
|
-
`
|
|
170
|
+
`GROUP_NOT_FOUND: ${body.message}`
|
|
123
171
|
);
|
|
124
172
|
this.body = body;
|
|
125
|
-
this.name = "
|
|
173
|
+
this.name = "GroupNotFoundError";
|
|
126
174
|
}
|
|
127
|
-
static code = "
|
|
175
|
+
static code = "GROUP_NOT_FOUND";
|
|
176
|
+
static statusCode = 404;
|
|
177
|
+
static description = `Group not found: {group_name}`;
|
|
178
|
+
}
|
|
179
|
+
class GroupAlreadyExistsError extends Error {
|
|
180
|
+
constructor(body) {
|
|
181
|
+
super(
|
|
182
|
+
`GROUP_ALREADY_EXISTS: ${body.message}`
|
|
183
|
+
);
|
|
184
|
+
this.body = body;
|
|
185
|
+
this.name = "GroupAlreadyExistsError";
|
|
186
|
+
}
|
|
187
|
+
static code = "GROUP_ALREADY_EXISTS";
|
|
188
|
+
static statusCode = 409;
|
|
189
|
+
static description = `Conflict: Group '{group_name}' already exists`;
|
|
190
|
+
}
|
|
191
|
+
class DuplicateUserNameError extends Error {
|
|
192
|
+
constructor(body) {
|
|
193
|
+
super(
|
|
194
|
+
`DUPLICATE_USER_NAME: ${body.message}`
|
|
195
|
+
);
|
|
196
|
+
this.body = body;
|
|
197
|
+
this.name = "DuplicateUserNameError";
|
|
198
|
+
}
|
|
199
|
+
static code = "DUPLICATE_USER_NAME";
|
|
128
200
|
static statusCode = 400;
|
|
129
|
-
static description = `
|
|
201
|
+
static description = `Duplicate user name '{name}' found`;
|
|
130
202
|
}
|
|
131
|
-
class
|
|
203
|
+
class UserGroupEmptyError extends Error {
|
|
132
204
|
constructor(body) {
|
|
133
205
|
super(
|
|
134
|
-
`
|
|
206
|
+
`USER_GROUP_EMPTY: ${body.message}`
|
|
135
207
|
);
|
|
136
208
|
this.body = body;
|
|
137
|
-
this.name = "
|
|
209
|
+
this.name = "UserGroupEmptyError";
|
|
138
210
|
}
|
|
139
|
-
static code = "
|
|
211
|
+
static code = "USER_GROUP_EMPTY";
|
|
140
212
|
static statusCode = 400;
|
|
141
|
-
static description = `
|
|
213
|
+
static description = `User '{user}' has empty string in groups`;
|
|
142
214
|
}
|
|
143
|
-
class
|
|
215
|
+
class UserSystemFlagMismatchError extends Error {
|
|
144
216
|
constructor(body) {
|
|
145
217
|
super(
|
|
146
|
-
`
|
|
218
|
+
`USER_SYSTEM_FLAG_MISMATCH: ${body.message}`
|
|
147
219
|
);
|
|
148
220
|
this.body = body;
|
|
149
|
-
this.name = "
|
|
221
|
+
this.name = "UserSystemFlagMismatchError";
|
|
150
222
|
}
|
|
151
|
-
static code = "
|
|
223
|
+
static code = "USER_SYSTEM_FLAG_MISMATCH";
|
|
152
224
|
static statusCode = 400;
|
|
153
|
-
static description = `
|
|
225
|
+
static description = `User '{user}' has system=true but UID {uid} is > 999 (system range)`;
|
|
154
226
|
}
|
|
155
|
-
class
|
|
227
|
+
class UserUidOutOfRangeError extends Error {
|
|
156
228
|
constructor(body) {
|
|
157
229
|
super(
|
|
158
|
-
`
|
|
230
|
+
`USER_UID_OUT_OF_RANGE: ${body.message}`
|
|
159
231
|
);
|
|
160
232
|
this.body = body;
|
|
161
|
-
this.name = "
|
|
233
|
+
this.name = "UserUidOutOfRangeError";
|
|
162
234
|
}
|
|
163
|
-
static code = "
|
|
235
|
+
static code = "USER_UID_OUT_OF_RANGE";
|
|
164
236
|
static statusCode = 400;
|
|
165
|
-
static description = `
|
|
237
|
+
static description = `User '{user}' has invalid UID {uid} (must be 0-65535)`;
|
|
166
238
|
}
|
|
167
|
-
class
|
|
239
|
+
class UserHomeInvalidError extends Error {
|
|
168
240
|
constructor(body) {
|
|
169
241
|
super(
|
|
170
|
-
`
|
|
242
|
+
`USER_HOME_INVALID: ${body.message}`
|
|
171
243
|
);
|
|
172
244
|
this.body = body;
|
|
173
|
-
this.name = "
|
|
245
|
+
this.name = "UserHomeInvalidError";
|
|
174
246
|
}
|
|
175
|
-
static code = "
|
|
247
|
+
static code = "USER_HOME_INVALID";
|
|
176
248
|
static statusCode = 400;
|
|
177
|
-
static description = `
|
|
249
|
+
static description = `User '{user}' has invalid home path '{home}' (must be absolute path starting with /)`;
|
|
178
250
|
}
|
|
179
|
-
class
|
|
251
|
+
class UserShellInvalidError extends Error {
|
|
180
252
|
constructor(body) {
|
|
181
253
|
super(
|
|
182
|
-
`
|
|
254
|
+
`USER_SHELL_INVALID: ${body.message}`
|
|
183
255
|
);
|
|
184
256
|
this.body = body;
|
|
185
|
-
this.name = "
|
|
257
|
+
this.name = "UserShellInvalidError";
|
|
186
258
|
}
|
|
187
|
-
static code = "
|
|
188
|
-
static statusCode =
|
|
189
|
-
static description = `
|
|
259
|
+
static code = "USER_SHELL_INVALID";
|
|
260
|
+
static statusCode = 400;
|
|
261
|
+
static description = `User '{user}' has invalid shell path '{shell}' (must be absolute path starting with /)`;
|
|
262
|
+
}
|
|
263
|
+
class DuplicateGroupNameError extends Error {
|
|
264
|
+
constructor(body) {
|
|
265
|
+
super(
|
|
266
|
+
`DUPLICATE_GROUP_NAME: ${body.message}`
|
|
267
|
+
);
|
|
268
|
+
this.body = body;
|
|
269
|
+
this.name = "DuplicateGroupNameError";
|
|
270
|
+
}
|
|
271
|
+
static code = "DUPLICATE_GROUP_NAME";
|
|
272
|
+
static statusCode = 400;
|
|
273
|
+
static description = `Duplicate group name '{name}' found`;
|
|
274
|
+
}
|
|
275
|
+
class GroupNameReservedError extends Error {
|
|
276
|
+
constructor(body) {
|
|
277
|
+
super(
|
|
278
|
+
`GROUP_NAME_RESERVED: ${body.message}`
|
|
279
|
+
);
|
|
280
|
+
this.body = body;
|
|
281
|
+
this.name = "GroupNameReservedError";
|
|
282
|
+
}
|
|
283
|
+
static code = "GROUP_NAME_RESERVED";
|
|
284
|
+
static statusCode = 400;
|
|
285
|
+
static description = `Group name '{name}' is reserved and cannot be used`;
|
|
286
|
+
}
|
|
287
|
+
class GroupNameInvalidCharsError extends Error {
|
|
288
|
+
constructor(body) {
|
|
289
|
+
super(
|
|
290
|
+
`GROUP_NAME_INVALID_CHARS: ${body.message}`
|
|
291
|
+
);
|
|
292
|
+
this.body = body;
|
|
293
|
+
this.name = "GroupNameInvalidCharsError";
|
|
294
|
+
}
|
|
295
|
+
static code = "GROUP_NAME_INVALID_CHARS";
|
|
296
|
+
static statusCode = 400;
|
|
297
|
+
static description = `Group name '{name}' contains invalid characters (must match [a-z_][a-z0-9_-]*)`;
|
|
298
|
+
}
|
|
299
|
+
class GroupNameTooLongError extends Error {
|
|
300
|
+
constructor(body) {
|
|
301
|
+
super(
|
|
302
|
+
`GROUP_NAME_TOO_LONG: ${body.message}`
|
|
303
|
+
);
|
|
304
|
+
this.body = body;
|
|
305
|
+
this.name = "GroupNameTooLongError";
|
|
306
|
+
}
|
|
307
|
+
static code = "GROUP_NAME_TOO_LONG";
|
|
308
|
+
static statusCode = 400;
|
|
309
|
+
static description = `Group name '{name}' is too long (max {max_length} characters)`;
|
|
310
|
+
}
|
|
311
|
+
class GroupNameEmptyError extends Error {
|
|
312
|
+
constructor(body) {
|
|
313
|
+
super(
|
|
314
|
+
`GROUP_NAME_EMPTY: ${body.message}`
|
|
315
|
+
);
|
|
316
|
+
this.body = body;
|
|
317
|
+
this.name = "GroupNameEmptyError";
|
|
318
|
+
}
|
|
319
|
+
static code = "GROUP_NAME_EMPTY";
|
|
320
|
+
static statusCode = 400;
|
|
321
|
+
static description = `Group name cannot be empty`;
|
|
190
322
|
}
|
|
191
323
|
class NoDefaultSnapshotAvailableError extends Error {
|
|
192
324
|
constructor(body) {
|
|
@@ -272,77 +404,101 @@ class GetDefaultSnapshotFailedError extends Error {
|
|
|
272
404
|
static statusCode = 500;
|
|
273
405
|
static description = `Failed to query account default snapshot for account {account_id}: {details}`;
|
|
274
406
|
}
|
|
275
|
-
class
|
|
407
|
+
class VmNotFoundInFsError extends Error {
|
|
276
408
|
constructor(body) {
|
|
277
409
|
super(
|
|
278
|
-
`
|
|
410
|
+
`VM_NOT_FOUND_IN_FS: ${body.message}`
|
|
279
411
|
);
|
|
280
412
|
this.body = body;
|
|
281
|
-
this.name = "
|
|
413
|
+
this.name = "VmNotFoundInFsError";
|
|
282
414
|
}
|
|
283
|
-
static code = "
|
|
284
|
-
static statusCode =
|
|
285
|
-
static description = `
|
|
415
|
+
static code = "VM_NOT_FOUND_IN_FS";
|
|
416
|
+
static statusCode = 406;
|
|
417
|
+
static description = `Vm Not found in filesystem`;
|
|
286
418
|
}
|
|
287
|
-
class
|
|
419
|
+
class DatabaseErrorError extends Error {
|
|
288
420
|
constructor(body) {
|
|
289
421
|
super(
|
|
290
|
-
`
|
|
422
|
+
`DATABASE_ERROR: ${body.message}`
|
|
291
423
|
);
|
|
292
424
|
this.body = body;
|
|
293
|
-
this.name = "
|
|
425
|
+
this.name = "DatabaseErrorError";
|
|
294
426
|
}
|
|
295
|
-
static code = "
|
|
296
|
-
static statusCode =
|
|
297
|
-
static description = `
|
|
427
|
+
static code = "DATABASE_ERROR";
|
|
428
|
+
static statusCode = 500;
|
|
429
|
+
static description = `Database error occurred while constructing VmRecord, details: {details}`;
|
|
298
430
|
}
|
|
299
|
-
class
|
|
431
|
+
class InvalidVmIdError extends Error {
|
|
300
432
|
constructor(body) {
|
|
301
433
|
super(
|
|
302
|
-
`
|
|
434
|
+
`INVALID_VM_ID: ${body.message}`
|
|
303
435
|
);
|
|
304
436
|
this.body = body;
|
|
305
|
-
this.name = "
|
|
437
|
+
this.name = "InvalidVmIdError";
|
|
306
438
|
}
|
|
307
|
-
static code = "
|
|
308
|
-
static statusCode =
|
|
309
|
-
static description = `VM
|
|
439
|
+
static code = "INVALID_VM_ID";
|
|
440
|
+
static statusCode = 400;
|
|
441
|
+
static description = `Invalid VM ID: {vm_id}, details: {details}`;
|
|
310
442
|
}
|
|
311
|
-
class
|
|
443
|
+
class VmDeletedError extends Error {
|
|
312
444
|
constructor(body) {
|
|
313
445
|
super(
|
|
314
|
-
`
|
|
446
|
+
`VM_DELETED: ${body.message}`
|
|
315
447
|
);
|
|
316
448
|
this.body = body;
|
|
317
|
-
this.name = "
|
|
449
|
+
this.name = "VmDeletedError";
|
|
318
450
|
}
|
|
319
|
-
static code = "
|
|
320
|
-
static statusCode =
|
|
321
|
-
static description = `
|
|
451
|
+
static code = "VM_DELETED";
|
|
452
|
+
static statusCode = 500;
|
|
453
|
+
static description = `Vm {vm_id} is marked as deleted but still exists in the database`;
|
|
322
454
|
}
|
|
323
|
-
class
|
|
455
|
+
class VmNotRunningError extends Error {
|
|
324
456
|
constructor(body) {
|
|
325
457
|
super(
|
|
326
|
-
`
|
|
458
|
+
`VM_NOT_RUNNING: ${body.message}`
|
|
327
459
|
);
|
|
328
460
|
this.body = body;
|
|
329
|
-
this.name = "
|
|
461
|
+
this.name = "VmNotRunningError";
|
|
330
462
|
}
|
|
331
|
-
static code = "
|
|
463
|
+
static code = "VM_NOT_RUNNING";
|
|
332
464
|
static statusCode = 400;
|
|
333
|
-
static description = `
|
|
465
|
+
static description = `Stopped VM not running`;
|
|
334
466
|
}
|
|
335
|
-
class
|
|
467
|
+
class ActiveTransactionErrorError extends Error {
|
|
336
468
|
constructor(body) {
|
|
337
469
|
super(
|
|
338
|
-
`
|
|
470
|
+
`ACTIVE_TRANSACTION_ERROR: ${body.message}`
|
|
339
471
|
);
|
|
340
472
|
this.body = body;
|
|
341
|
-
this.name = "
|
|
473
|
+
this.name = "ActiveTransactionErrorError";
|
|
342
474
|
}
|
|
343
|
-
static code = "
|
|
475
|
+
static code = "ACTIVE_TRANSACTION_ERROR";
|
|
476
|
+
static statusCode = 500;
|
|
477
|
+
static description = `Active transaction error: {details}`;
|
|
478
|
+
}
|
|
479
|
+
class SwapVmTapError extends Error {
|
|
480
|
+
constructor(body) {
|
|
481
|
+
super(
|
|
482
|
+
`SWAP_VM_TAP: ${body.message}`
|
|
483
|
+
);
|
|
484
|
+
this.body = body;
|
|
485
|
+
this.name = "SwapVmTapError";
|
|
486
|
+
}
|
|
487
|
+
static code = "SWAP_VM_TAP";
|
|
488
|
+
static statusCode = 500;
|
|
489
|
+
static description = `Failed to swap tap device: {details}`;
|
|
490
|
+
}
|
|
491
|
+
class PreassignedVmIdCountMismatchError extends Error {
|
|
492
|
+
constructor(body) {
|
|
493
|
+
super(
|
|
494
|
+
`PREASSIGNED_VM_ID_COUNT_MISMATCH: ${body.message}`
|
|
495
|
+
);
|
|
496
|
+
this.body = body;
|
|
497
|
+
this.name = "PreassignedVmIdCountMismatchError";
|
|
498
|
+
}
|
|
499
|
+
static code = "PREASSIGNED_VM_ID_COUNT_MISMATCH";
|
|
344
500
|
static statusCode = 400;
|
|
345
|
-
static description = `
|
|
501
|
+
static description = `Pre-provisioned vm_ids length ({provided}) must match fork count ({count})`;
|
|
346
502
|
}
|
|
347
503
|
class InternalErrorError extends Error {
|
|
348
504
|
constructor(body) {
|
|
@@ -354,307 +510,355 @@ class InternalErrorError extends Error {
|
|
|
354
510
|
}
|
|
355
511
|
static code = "INTERNAL_ERROR";
|
|
356
512
|
static statusCode = 500;
|
|
357
|
-
static description = `
|
|
513
|
+
static description = `Fork failed: {message}`;
|
|
358
514
|
}
|
|
359
|
-
class
|
|
515
|
+
class RootfsCopyErrorError extends Error {
|
|
360
516
|
constructor(body) {
|
|
361
517
|
super(
|
|
362
|
-
`
|
|
518
|
+
`ROOTFS_COPY_ERROR: ${body.message}`
|
|
363
519
|
);
|
|
364
520
|
this.body = body;
|
|
365
|
-
this.name = "
|
|
521
|
+
this.name = "RootfsCopyErrorError";
|
|
366
522
|
}
|
|
367
|
-
static code = "
|
|
523
|
+
static code = "ROOTFS_COPY_ERROR";
|
|
524
|
+
static statusCode = 500;
|
|
525
|
+
static description = `Failed to copy rootfs from {from} to {to}: {details}`;
|
|
526
|
+
}
|
|
527
|
+
class FileNotFoundError extends Error {
|
|
528
|
+
constructor(body) {
|
|
529
|
+
super(
|
|
530
|
+
`FILE_NOT_FOUND: ${body.message}`
|
|
531
|
+
);
|
|
532
|
+
this.body = body;
|
|
533
|
+
this.name = "FileNotFoundError";
|
|
534
|
+
}
|
|
535
|
+
static code = "FILE_NOT_FOUND";
|
|
368
536
|
static statusCode = 404;
|
|
369
|
-
static description = `
|
|
537
|
+
static description = `File not found: {path}`;
|
|
370
538
|
}
|
|
371
|
-
class
|
|
539
|
+
class FilesBadRequestError extends Error {
|
|
372
540
|
constructor(body) {
|
|
373
541
|
super(
|
|
374
|
-
`
|
|
542
|
+
`FILES_BAD_REQUEST: ${body.message}`
|
|
375
543
|
);
|
|
376
544
|
this.body = body;
|
|
377
|
-
this.name = "
|
|
545
|
+
this.name = "FilesBadRequestError";
|
|
378
546
|
}
|
|
379
|
-
static code = "
|
|
547
|
+
static code = "FILES_BAD_REQUEST";
|
|
380
548
|
static statusCode = 400;
|
|
381
549
|
static description = `Bad request: {message}`;
|
|
382
550
|
}
|
|
383
|
-
class
|
|
551
|
+
class VmNotFoundError extends Error {
|
|
384
552
|
constructor(body) {
|
|
385
553
|
super(
|
|
386
|
-
`
|
|
554
|
+
`VM_NOT_FOUND: ${body.message}`
|
|
387
555
|
);
|
|
388
556
|
this.body = body;
|
|
389
|
-
this.name = "
|
|
557
|
+
this.name = "VmNotFoundError";
|
|
390
558
|
}
|
|
391
|
-
static code = "
|
|
559
|
+
static code = "VM_NOT_FOUND";
|
|
392
560
|
static statusCode = 404;
|
|
393
|
-
static description = `
|
|
561
|
+
static description = `VM not found: {vm_id}`;
|
|
394
562
|
}
|
|
395
|
-
class
|
|
563
|
+
class InternalForkVmNotFoundError extends Error {
|
|
396
564
|
constructor(body) {
|
|
397
565
|
super(
|
|
398
|
-
`
|
|
566
|
+
`INTERNAL_FORK_VM_NOT_FOUND: ${body.message}`
|
|
399
567
|
);
|
|
400
568
|
this.body = body;
|
|
401
|
-
this.name = "
|
|
569
|
+
this.name = "InternalForkVmNotFoundError";
|
|
402
570
|
}
|
|
403
|
-
static code = "
|
|
404
|
-
static statusCode =
|
|
405
|
-
static description = `
|
|
571
|
+
static code = "INTERNAL_FORK_VM_NOT_FOUND";
|
|
572
|
+
static statusCode = 404;
|
|
573
|
+
static description = `The VM you're trying to fork from was not found: {fork_vm_id}`;
|
|
406
574
|
}
|
|
407
|
-
class
|
|
575
|
+
class BadRequestError extends Error {
|
|
408
576
|
constructor(body) {
|
|
409
577
|
super(
|
|
410
|
-
`
|
|
578
|
+
`BAD_REQUEST: ${body.message}`
|
|
411
579
|
);
|
|
412
580
|
this.body = body;
|
|
413
|
-
this.name = "
|
|
581
|
+
this.name = "BadRequestError";
|
|
414
582
|
}
|
|
415
|
-
static code = "
|
|
583
|
+
static code = "BAD_REQUEST";
|
|
416
584
|
static statusCode = 400;
|
|
417
|
-
static description = `
|
|
585
|
+
static description = `Bad request: {message}`;
|
|
418
586
|
}
|
|
419
|
-
class
|
|
587
|
+
class InternalVmNotFoundError extends Error {
|
|
420
588
|
constructor(body) {
|
|
421
589
|
super(
|
|
422
|
-
`
|
|
590
|
+
`INTERNAL_VM_NOT_FOUND: ${body.message}`
|
|
423
591
|
);
|
|
424
592
|
this.body = body;
|
|
425
|
-
this.name = "
|
|
593
|
+
this.name = "InternalVmNotFoundError";
|
|
426
594
|
}
|
|
427
|
-
static code = "
|
|
595
|
+
static code = "INTERNAL_VM_NOT_FOUND";
|
|
428
596
|
static statusCode = 404;
|
|
429
|
-
static description = `
|
|
597
|
+
static description = `VM not found: {vm_id}`;
|
|
430
598
|
}
|
|
431
|
-
class
|
|
599
|
+
class SnapshotIsAccountDefaultError extends Error {
|
|
432
600
|
constructor(body) {
|
|
433
601
|
super(
|
|
434
|
-
`
|
|
602
|
+
`SNAPSHOT_IS_ACCOUNT_DEFAULT: ${body.message}`
|
|
435
603
|
);
|
|
436
604
|
this.body = body;
|
|
437
|
-
this.name = "
|
|
605
|
+
this.name = "SnapshotIsAccountDefaultError";
|
|
438
606
|
}
|
|
439
|
-
static code = "
|
|
607
|
+
static code = "SNAPSHOT_IS_ACCOUNT_DEFAULT";
|
|
440
608
|
static statusCode = 409;
|
|
441
|
-
static description = `
|
|
609
|
+
static description = `Snapshot is the account default and cannot be deleted: {snapshot_id}`;
|
|
442
610
|
}
|
|
443
|
-
class
|
|
611
|
+
class SnapshotAlreadyDeletedError extends Error {
|
|
444
612
|
constructor(body) {
|
|
445
613
|
super(
|
|
446
|
-
`
|
|
614
|
+
`SNAPSHOT_ALREADY_DELETED: ${body.message}`
|
|
447
615
|
);
|
|
448
616
|
this.body = body;
|
|
449
|
-
this.name = "
|
|
617
|
+
this.name = "SnapshotAlreadyDeletedError";
|
|
450
618
|
}
|
|
451
|
-
static code = "
|
|
452
|
-
static statusCode =
|
|
453
|
-
static description = `
|
|
619
|
+
static code = "SNAPSHOT_ALREADY_DELETED";
|
|
620
|
+
static statusCode = 409;
|
|
621
|
+
static description = `Snapshot already deleted: {snapshot_id}`;
|
|
454
622
|
}
|
|
455
|
-
class
|
|
623
|
+
class SnapshotNotFoundError extends Error {
|
|
456
624
|
constructor(body) {
|
|
457
625
|
super(
|
|
458
|
-
`
|
|
626
|
+
`SNAPSHOT_NOT_FOUND: ${body.message}`
|
|
459
627
|
);
|
|
460
628
|
this.body = body;
|
|
461
|
-
this.name = "
|
|
629
|
+
this.name = "SnapshotNotFoundError";
|
|
462
630
|
}
|
|
463
|
-
static code = "
|
|
464
|
-
static statusCode =
|
|
465
|
-
static description = `
|
|
631
|
+
static code = "SNAPSHOT_NOT_FOUND";
|
|
632
|
+
static statusCode = 404;
|
|
633
|
+
static description = `Snapshot not found: {snapshot_id}`;
|
|
466
634
|
}
|
|
467
|
-
class
|
|
635
|
+
class SnapshotSetupFailedError extends Error {
|
|
468
636
|
constructor(body) {
|
|
469
637
|
super(
|
|
470
|
-
`
|
|
638
|
+
`SNAPSHOT_SETUP_FAILED: ${body.message}`
|
|
471
639
|
);
|
|
472
640
|
this.body = body;
|
|
473
|
-
this.name = "
|
|
641
|
+
this.name = "SnapshotSetupFailedError";
|
|
474
642
|
}
|
|
475
|
-
static code = "
|
|
476
|
-
static statusCode =
|
|
477
|
-
static description = `
|
|
643
|
+
static code = "SNAPSHOT_SETUP_FAILED";
|
|
644
|
+
static statusCode = 500;
|
|
645
|
+
static description = `Snapshot setup failed: {failed_reason}`;
|
|
478
646
|
}
|
|
479
|
-
class
|
|
647
|
+
class SnapshotVmBadRequestError extends Error {
|
|
480
648
|
constructor(body) {
|
|
481
649
|
super(
|
|
482
|
-
`
|
|
650
|
+
`SNAPSHOT_VM_BAD_REQUEST: ${body.message}`
|
|
483
651
|
);
|
|
484
652
|
this.body = body;
|
|
485
|
-
this.name = "
|
|
653
|
+
this.name = "SnapshotVmBadRequestError";
|
|
486
654
|
}
|
|
487
|
-
static code = "
|
|
655
|
+
static code = "SNAPSHOT_VM_BAD_REQUEST";
|
|
488
656
|
static statusCode = 400;
|
|
489
|
-
static description = `
|
|
657
|
+
static description = `Bad request: {message}`;
|
|
490
658
|
}
|
|
491
|
-
class
|
|
659
|
+
class StartingHandleInstanceIdMismatchError extends Error {
|
|
492
660
|
constructor(body) {
|
|
493
661
|
super(
|
|
494
|
-
`
|
|
662
|
+
`STARTING_HANDLE_INSTANCE_ID_MISMATCH: ${body.message}`
|
|
495
663
|
);
|
|
496
664
|
this.body = body;
|
|
497
|
-
this.name = "
|
|
665
|
+
this.name = "StartingHandleInstanceIdMismatchError";
|
|
498
666
|
}
|
|
499
|
-
static code = "
|
|
500
|
-
static statusCode =
|
|
501
|
-
static description = `
|
|
667
|
+
static code = "STARTING_HANDLE_INSTANCE_ID_MISMATCH";
|
|
668
|
+
static statusCode = 409;
|
|
669
|
+
static description = `Starting handle for VM {vm_id} is held by instance {actual_instance_id}, not {provided_instance_id}`;
|
|
502
670
|
}
|
|
503
|
-
class
|
|
671
|
+
class SuspendFailedAndStopFailedError extends Error {
|
|
504
672
|
constructor(body) {
|
|
505
673
|
super(
|
|
506
|
-
`
|
|
674
|
+
`SUSPEND_FAILED_AND_STOP_FAILED: ${body.message}`
|
|
507
675
|
);
|
|
508
676
|
this.body = body;
|
|
509
|
-
this.name = "
|
|
677
|
+
this.name = "SuspendFailedAndStopFailedError";
|
|
510
678
|
}
|
|
511
|
-
static code = "
|
|
512
|
-
static statusCode =
|
|
513
|
-
static description = `
|
|
679
|
+
static code = "SUSPEND_FAILED_AND_STOP_FAILED";
|
|
680
|
+
static statusCode = 500;
|
|
681
|
+
static description = `Failed to gracefully suspend or stop VM`;
|
|
514
682
|
}
|
|
515
|
-
class
|
|
683
|
+
class SuspendFailedAndStoppedError extends Error {
|
|
516
684
|
constructor(body) {
|
|
517
685
|
super(
|
|
518
|
-
`
|
|
686
|
+
`SUSPEND_FAILED_AND_STOPPED: ${body.message}`
|
|
519
687
|
);
|
|
520
688
|
this.body = body;
|
|
521
|
-
this.name = "
|
|
689
|
+
this.name = "SuspendFailedAndStoppedError";
|
|
522
690
|
}
|
|
523
|
-
static code = "
|
|
524
|
-
static statusCode =
|
|
525
|
-
static description = `
|
|
691
|
+
static code = "SUSPEND_FAILED_AND_STOPPED";
|
|
692
|
+
static statusCode = 500;
|
|
693
|
+
static description = `Failed to gracefully suspend, stopped VM`;
|
|
526
694
|
}
|
|
527
|
-
class
|
|
695
|
+
class ResizeVmMemNotPowerOfTwoError extends Error {
|
|
528
696
|
constructor(body) {
|
|
529
697
|
super(
|
|
530
|
-
`
|
|
698
|
+
`RESIZE_VM_MEM_NOT_POWER_OF_TWO: ${body.message}`
|
|
531
699
|
);
|
|
532
700
|
this.body = body;
|
|
533
|
-
this.name = "
|
|
701
|
+
this.name = "ResizeVmMemNotPowerOfTwoError";
|
|
534
702
|
}
|
|
535
|
-
static code = "
|
|
703
|
+
static code = "RESIZE_VM_MEM_NOT_POWER_OF_TWO";
|
|
536
704
|
static statusCode = 400;
|
|
537
|
-
static description = `
|
|
705
|
+
static description = `memSizeMb must be a power of two in MiB (got {got} MiB)`;
|
|
538
706
|
}
|
|
539
|
-
class
|
|
707
|
+
class ResizeVmVcpuNotPowerOfTwoError extends Error {
|
|
540
708
|
constructor(body) {
|
|
541
709
|
super(
|
|
542
|
-
`
|
|
710
|
+
`RESIZE_VM_VCPU_NOT_POWER_OF_TWO: ${body.message}`
|
|
543
711
|
);
|
|
544
712
|
this.body = body;
|
|
545
|
-
this.name = "
|
|
713
|
+
this.name = "ResizeVmVcpuNotPowerOfTwoError";
|
|
546
714
|
}
|
|
547
|
-
static code = "
|
|
715
|
+
static code = "RESIZE_VM_VCPU_NOT_POWER_OF_TWO";
|
|
548
716
|
static statusCode = 400;
|
|
549
|
-
static description = `
|
|
717
|
+
static description = `vcpuCount must be a power of two (got {got})`;
|
|
550
718
|
}
|
|
551
|
-
class
|
|
719
|
+
class ResizeVmMemOutOfRangeError extends Error {
|
|
552
720
|
constructor(body) {
|
|
553
721
|
super(
|
|
554
|
-
`
|
|
722
|
+
`RESIZE_VM_MEM_OUT_OF_RANGE: ${body.message}`
|
|
555
723
|
);
|
|
556
724
|
this.body = body;
|
|
557
|
-
this.name = "
|
|
725
|
+
this.name = "ResizeVmMemOutOfRangeError";
|
|
558
726
|
}
|
|
559
|
-
static code = "
|
|
727
|
+
static code = "RESIZE_VM_MEM_OUT_OF_RANGE";
|
|
560
728
|
static statusCode = 400;
|
|
561
|
-
static description = `
|
|
729
|
+
static description = `memSizeMb out of range (got {got}MiB, allowed {min}..={max} MiB)`;
|
|
562
730
|
}
|
|
563
|
-
class
|
|
731
|
+
class ResizeVmVcpuOutOfRangeError extends Error {
|
|
564
732
|
constructor(body) {
|
|
565
733
|
super(
|
|
566
|
-
`
|
|
734
|
+
`RESIZE_VM_VCPU_OUT_OF_RANGE: ${body.message}`
|
|
567
735
|
);
|
|
568
736
|
this.body = body;
|
|
569
|
-
this.name = "
|
|
737
|
+
this.name = "ResizeVmVcpuOutOfRangeError";
|
|
570
738
|
}
|
|
571
|
-
static code = "
|
|
739
|
+
static code = "RESIZE_VM_VCPU_OUT_OF_RANGE";
|
|
572
740
|
static statusCode = 400;
|
|
573
|
-
static description = `
|
|
741
|
+
static description = `vcpuCount out of range (got {got}, allowed 1..={max})`;
|
|
574
742
|
}
|
|
575
|
-
class
|
|
743
|
+
class ResizeVmRootfsShrinkNotSupportedError extends Error {
|
|
576
744
|
constructor(body) {
|
|
577
745
|
super(
|
|
578
|
-
`
|
|
746
|
+
`RESIZE_VM_ROOTFS_SHRINK_NOT_SUPPORTED: ${body.message}`
|
|
579
747
|
);
|
|
580
748
|
this.body = body;
|
|
581
|
-
this.name = "
|
|
749
|
+
this.name = "ResizeVmRootfsShrinkNotSupportedError";
|
|
582
750
|
}
|
|
583
|
-
static code = "
|
|
584
|
-
static statusCode =
|
|
585
|
-
static description = `
|
|
751
|
+
static code = "RESIZE_VM_ROOTFS_SHRINK_NOT_SUPPORTED";
|
|
752
|
+
static statusCode = 400;
|
|
753
|
+
static description = `Rootfs shrink is not supported (current={current_mb}MiB, requested={requested_mb}MiB)`;
|
|
586
754
|
}
|
|
587
|
-
class
|
|
755
|
+
class ResizeVmEmptyRequestError extends Error {
|
|
588
756
|
constructor(body) {
|
|
589
757
|
super(
|
|
590
|
-
`
|
|
758
|
+
`RESIZE_VM_EMPTY_REQUEST: ${body.message}`
|
|
591
759
|
);
|
|
592
760
|
this.body = body;
|
|
593
|
-
this.name = "
|
|
761
|
+
this.name = "ResizeVmEmptyRequestError";
|
|
594
762
|
}
|
|
595
|
-
static code = "
|
|
763
|
+
static code = "RESIZE_VM_EMPTY_REQUEST";
|
|
596
764
|
static statusCode = 400;
|
|
597
|
-
static description = `
|
|
765
|
+
static description = `Resize request must specify at least one of vcpuCount, memSizeMb, or rootfsSizeMb`;
|
|
598
766
|
}
|
|
599
|
-
class
|
|
767
|
+
class ExecTimedOutError extends Error {
|
|
600
768
|
constructor(body) {
|
|
601
769
|
super(
|
|
602
|
-
`
|
|
770
|
+
`EXEC_TIMED_OUT: ${body.message}`
|
|
603
771
|
);
|
|
604
772
|
this.body = body;
|
|
605
|
-
this.name = "
|
|
773
|
+
this.name = "ExecTimedOutError";
|
|
606
774
|
}
|
|
607
|
-
static code = "
|
|
608
|
-
static statusCode =
|
|
609
|
-
static description = `
|
|
775
|
+
static code = "EXEC_TIMED_OUT";
|
|
776
|
+
static statusCode = 408;
|
|
777
|
+
static description = `Command timed out after {timeout_ms}ms`;
|
|
610
778
|
}
|
|
611
|
-
class
|
|
779
|
+
class ConflictingSpecSourcesErrorError extends Error {
|
|
612
780
|
constructor(body) {
|
|
613
781
|
super(
|
|
614
|
-
`
|
|
782
|
+
`CONFLICTING_SPEC_SOURCES_ERROR: ${body.message}`
|
|
615
783
|
);
|
|
616
784
|
this.body = body;
|
|
617
|
-
this.name = "
|
|
785
|
+
this.name = "ConflictingSpecSourcesErrorError";
|
|
618
786
|
}
|
|
619
|
-
static code = "
|
|
787
|
+
static code = "CONFLICTING_SPEC_SOURCES_ERROR";
|
|
788
|
+
static statusCode = 400;
|
|
789
|
+
static description = `Spec layer at depth {depth} has conflicting base sources \`{field_a}\` and \`{field_b}\`; each layer may set at most one of \`snapshot\`, \`snapshotId\`, \`baseImage\``;
|
|
790
|
+
}
|
|
791
|
+
class NonLeafLayerFieldErrorError extends Error {
|
|
792
|
+
constructor(body) {
|
|
793
|
+
super(
|
|
794
|
+
`NON_LEAF_LAYER_FIELD_ERROR: ${body.message}`
|
|
795
|
+
);
|
|
796
|
+
this.body = body;
|
|
797
|
+
this.name = "NonLeafLayerFieldErrorError";
|
|
798
|
+
}
|
|
799
|
+
static code = "NON_LEAF_LAYER_FIELD_ERROR";
|
|
800
|
+
static statusCode = 400;
|
|
801
|
+
static description = `Field \`{field}\` may only be set on the innermost spec layer; found on a non-leaf layer at depth {depth} (0 = outermost)`;
|
|
802
|
+
}
|
|
803
|
+
class InvalidGitRepoSpecErrorError extends Error {
|
|
804
|
+
constructor(body) {
|
|
805
|
+
super(
|
|
806
|
+
`INVALID_GIT_REPO_SPEC_ERROR: ${body.message}`
|
|
807
|
+
);
|
|
808
|
+
this.body = body;
|
|
809
|
+
this.name = "InvalidGitRepoSpecErrorError";
|
|
810
|
+
}
|
|
811
|
+
static code = "INVALID_GIT_REPO_SPEC_ERROR";
|
|
812
|
+
static statusCode = 400;
|
|
813
|
+
static description = `Cannot specify both root-level \`gitRepos\` and \`git.repos\`. Prefer \`git.repos\`.`;
|
|
814
|
+
}
|
|
815
|
+
class ForkVmNotFoundError extends Error {
|
|
816
|
+
constructor(body) {
|
|
817
|
+
super(
|
|
818
|
+
`FORK_VM_NOT_FOUND: ${body.message}`
|
|
819
|
+
);
|
|
820
|
+
this.body = body;
|
|
821
|
+
this.name = "ForkVmNotFoundError";
|
|
822
|
+
}
|
|
823
|
+
static code = "FORK_VM_NOT_FOUND";
|
|
620
824
|
static statusCode = 404;
|
|
621
|
-
static description = `
|
|
825
|
+
static description = `Fork VM not found: {fork_vm_id}`;
|
|
622
826
|
}
|
|
623
|
-
class
|
|
827
|
+
class CreateSnapshotBadRequestError extends Error {
|
|
624
828
|
constructor(body) {
|
|
625
829
|
super(
|
|
626
|
-
`
|
|
830
|
+
`CREATE_SNAPSHOT_BAD_REQUEST: ${body.message}`
|
|
627
831
|
);
|
|
628
832
|
this.body = body;
|
|
629
|
-
this.name = "
|
|
833
|
+
this.name = "CreateSnapshotBadRequestError";
|
|
630
834
|
}
|
|
631
|
-
static code = "
|
|
835
|
+
static code = "CREATE_SNAPSHOT_BAD_REQUEST";
|
|
632
836
|
static statusCode = 400;
|
|
633
837
|
static description = `Bad request: {message}`;
|
|
634
838
|
}
|
|
635
|
-
class
|
|
839
|
+
class UnsupportedOsError extends Error {
|
|
636
840
|
constructor(body) {
|
|
637
841
|
super(
|
|
638
|
-
`
|
|
842
|
+
`UNSUPPORTED_OS: ${body.message}`
|
|
639
843
|
);
|
|
640
844
|
this.body = body;
|
|
641
|
-
this.name = "
|
|
845
|
+
this.name = "UnsupportedOsError";
|
|
642
846
|
}
|
|
643
|
-
static code = "
|
|
644
|
-
static statusCode =
|
|
645
|
-
static description = `
|
|
847
|
+
static code = "UNSUPPORTED_OS";
|
|
848
|
+
static statusCode = 400;
|
|
849
|
+
static description = `Unsupported base image OS: {os}`;
|
|
646
850
|
}
|
|
647
|
-
class
|
|
851
|
+
class BuildFailedError extends Error {
|
|
648
852
|
constructor(body) {
|
|
649
853
|
super(
|
|
650
|
-
`
|
|
854
|
+
`BUILD_FAILED: ${body.message}`
|
|
651
855
|
);
|
|
652
856
|
this.body = body;
|
|
653
|
-
this.name = "
|
|
857
|
+
this.name = "BuildFailedError";
|
|
654
858
|
}
|
|
655
|
-
static code = "
|
|
656
|
-
static statusCode =
|
|
657
|
-
static description = `
|
|
859
|
+
static code = "BUILD_FAILED";
|
|
860
|
+
static statusCode = 400;
|
|
861
|
+
static description = `Dockerfile build failed (exit {exit_code})`;
|
|
658
862
|
}
|
|
659
863
|
class ResumedVmNonResponsiveError extends Error {
|
|
660
864
|
constructor(body) {
|
|
@@ -704,18 +908,6 @@ class KernelPanicError extends Error {
|
|
|
704
908
|
static statusCode = 500;
|
|
705
909
|
static description = `VM kernel panic detected`;
|
|
706
910
|
}
|
|
707
|
-
class VmDeletedError extends Error {
|
|
708
|
-
constructor(body) {
|
|
709
|
-
super(
|
|
710
|
-
`VM_DELETED: ${body.message}`
|
|
711
|
-
);
|
|
712
|
-
this.body = body;
|
|
713
|
-
this.name = "VmDeletedError";
|
|
714
|
-
}
|
|
715
|
-
static code = "VM_DELETED";
|
|
716
|
-
static statusCode = 410;
|
|
717
|
-
static description = `Cannot start VM: VM files have been deleted. This VM was ephemeral and its files were removed.`;
|
|
718
|
-
}
|
|
719
911
|
class ReqwestError extends Error {
|
|
720
912
|
constructor(body) {
|
|
721
913
|
super(
|
|
@@ -848,298 +1040,154 @@ class VmSubnetNotFoundError extends Error {
|
|
|
848
1040
|
static statusCode = 500;
|
|
849
1041
|
static description = `Subnet for VM not found`;
|
|
850
1042
|
}
|
|
851
|
-
class
|
|
1043
|
+
class CreateVmMemNotPowerOfTwoError extends Error {
|
|
852
1044
|
constructor(body) {
|
|
853
1045
|
super(
|
|
854
|
-
`
|
|
1046
|
+
`CREATE_VM_MEM_NOT_POWER_OF_TWO: ${body.message}`
|
|
855
1047
|
);
|
|
856
1048
|
this.body = body;
|
|
857
|
-
this.name = "
|
|
1049
|
+
this.name = "CreateVmMemNotPowerOfTwoError";
|
|
858
1050
|
}
|
|
859
|
-
static code = "
|
|
860
|
-
static statusCode =
|
|
861
|
-
static description = `
|
|
1051
|
+
static code = "CREATE_VM_MEM_NOT_POWER_OF_TWO";
|
|
1052
|
+
static statusCode = 400;
|
|
1053
|
+
static description = `memSizeMb must be a power of two in MiB (got {got} MiB)`;
|
|
862
1054
|
}
|
|
863
|
-
class
|
|
1055
|
+
class CreateVmVcpuNotPowerOfTwoError extends Error {
|
|
864
1056
|
constructor(body) {
|
|
865
1057
|
super(
|
|
866
|
-
`
|
|
1058
|
+
`CREATE_VM_VCPU_NOT_POWER_OF_TWO: ${body.message}`
|
|
867
1059
|
);
|
|
868
1060
|
this.body = body;
|
|
869
|
-
this.name = "
|
|
1061
|
+
this.name = "CreateVmVcpuNotPowerOfTwoError";
|
|
870
1062
|
}
|
|
871
|
-
static code = "
|
|
872
|
-
static statusCode =
|
|
873
|
-
static description = `
|
|
1063
|
+
static code = "CREATE_VM_VCPU_NOT_POWER_OF_TWO";
|
|
1064
|
+
static statusCode = 400;
|
|
1065
|
+
static description = `vcpuCount must be a power of two (got {got})`;
|
|
874
1066
|
}
|
|
875
|
-
class
|
|
1067
|
+
class CreateVmRootfsOutOfRangeError extends Error {
|
|
876
1068
|
constructor(body) {
|
|
877
1069
|
super(
|
|
878
|
-
`
|
|
1070
|
+
`CREATE_VM_ROOTFS_OUT_OF_RANGE: ${body.message}`
|
|
879
1071
|
);
|
|
880
1072
|
this.body = body;
|
|
881
|
-
this.name = "
|
|
1073
|
+
this.name = "CreateVmRootfsOutOfRangeError";
|
|
882
1074
|
}
|
|
883
|
-
static code = "
|
|
884
|
-
static statusCode =
|
|
885
|
-
static description = `
|
|
1075
|
+
static code = "CREATE_VM_ROOTFS_OUT_OF_RANGE";
|
|
1076
|
+
static statusCode = 400;
|
|
1077
|
+
static description = `rootfsSizeMb out of range (got {got} MB, allowed {min}..={max} MB)`;
|
|
886
1078
|
}
|
|
887
|
-
class
|
|
1079
|
+
class CreateVmMemOutOfRangeError extends Error {
|
|
888
1080
|
constructor(body) {
|
|
889
1081
|
super(
|
|
890
|
-
`
|
|
1082
|
+
`CREATE_VM_MEM_OUT_OF_RANGE: ${body.message}`
|
|
891
1083
|
);
|
|
892
1084
|
this.body = body;
|
|
893
|
-
this.name = "
|
|
1085
|
+
this.name = "CreateVmMemOutOfRangeError";
|
|
894
1086
|
}
|
|
895
|
-
static code = "
|
|
896
|
-
static statusCode =
|
|
897
|
-
static description = `
|
|
1087
|
+
static code = "CREATE_VM_MEM_OUT_OF_RANGE";
|
|
1088
|
+
static statusCode = 400;
|
|
1089
|
+
static description = `memSizeMb out of range (got {got} MiB, allowed {min}..={max} MiB)`;
|
|
898
1090
|
}
|
|
899
|
-
class
|
|
1091
|
+
class CreateVmVcpuOutOfRangeError extends Error {
|
|
900
1092
|
constructor(body) {
|
|
901
1093
|
super(
|
|
902
|
-
`
|
|
1094
|
+
`CREATE_VM_VCPU_OUT_OF_RANGE: ${body.message}`
|
|
903
1095
|
);
|
|
904
1096
|
this.body = body;
|
|
905
|
-
this.name = "
|
|
1097
|
+
this.name = "CreateVmVcpuOutOfRangeError";
|
|
906
1098
|
}
|
|
907
|
-
static code = "
|
|
908
|
-
static statusCode =
|
|
909
|
-
static description = `
|
|
1099
|
+
static code = "CREATE_VM_VCPU_OUT_OF_RANGE";
|
|
1100
|
+
static statusCode = 400;
|
|
1101
|
+
static description = `vcpuCount out of range (got {got}, allowed 1..={max})`;
|
|
910
1102
|
}
|
|
911
|
-
class
|
|
1103
|
+
class CreateVmBadRequestError extends Error {
|
|
912
1104
|
constructor(body) {
|
|
913
1105
|
super(
|
|
914
|
-
`
|
|
1106
|
+
`CREATE_VM_BAD_REQUEST: ${body.message}`
|
|
915
1107
|
);
|
|
916
1108
|
this.body = body;
|
|
917
|
-
this.name = "
|
|
1109
|
+
this.name = "CreateVmBadRequestError";
|
|
918
1110
|
}
|
|
919
|
-
static code = "
|
|
1111
|
+
static code = "CREATE_VM_BAD_REQUEST";
|
|
920
1112
|
static statusCode = 400;
|
|
921
1113
|
static description = `Bad request: {message}`;
|
|
922
1114
|
}
|
|
923
|
-
class
|
|
1115
|
+
class VmSetupFailedError extends Error {
|
|
924
1116
|
constructor(body) {
|
|
925
1117
|
super(
|
|
926
|
-
`
|
|
1118
|
+
`VM_SETUP_FAILED: ${body.message}`
|
|
927
1119
|
);
|
|
928
1120
|
this.body = body;
|
|
929
|
-
this.name = "
|
|
1121
|
+
this.name = "VmSetupFailedError";
|
|
930
1122
|
}
|
|
931
|
-
static code = "
|
|
932
|
-
static statusCode =
|
|
933
|
-
static description = `
|
|
1123
|
+
static code = "VM_SETUP_FAILED";
|
|
1124
|
+
static statusCode = 500;
|
|
1125
|
+
static description = `VM setup failed: {failed_reason}`;
|
|
934
1126
|
}
|
|
935
|
-
class
|
|
1127
|
+
class WantedByEmptyError extends Error {
|
|
936
1128
|
constructor(body) {
|
|
937
1129
|
super(
|
|
938
|
-
`
|
|
1130
|
+
`WANTED_BY_EMPTY: ${body.message}`
|
|
939
1131
|
);
|
|
940
1132
|
this.body = body;
|
|
941
|
-
this.name = "
|
|
1133
|
+
this.name = "WantedByEmptyError";
|
|
942
1134
|
}
|
|
943
|
-
static code = "
|
|
944
|
-
static statusCode =
|
|
945
|
-
static description = `
|
|
1135
|
+
static code = "WANTED_BY_EMPTY";
|
|
1136
|
+
static statusCode = 400;
|
|
1137
|
+
static description = `wanted_by cannot be empty if provided`;
|
|
946
1138
|
}
|
|
947
|
-
class
|
|
1139
|
+
class WorkdirEmptyError extends Error {
|
|
948
1140
|
constructor(body) {
|
|
949
1141
|
super(
|
|
950
|
-
`
|
|
1142
|
+
`WORKDIR_EMPTY: ${body.message}`
|
|
951
1143
|
);
|
|
952
1144
|
this.body = body;
|
|
953
|
-
this.name = "
|
|
1145
|
+
this.name = "WorkdirEmptyError";
|
|
954
1146
|
}
|
|
955
|
-
static code = "
|
|
956
|
-
static statusCode =
|
|
957
|
-
static description = `
|
|
1147
|
+
static code = "WORKDIR_EMPTY";
|
|
1148
|
+
static statusCode = 400;
|
|
1149
|
+
static description = `Working directory cannot be empty if provided`;
|
|
958
1150
|
}
|
|
959
|
-
class
|
|
1151
|
+
class GroupEmptyError extends Error {
|
|
960
1152
|
constructor(body) {
|
|
961
1153
|
super(
|
|
962
|
-
`
|
|
1154
|
+
`GROUP_EMPTY: ${body.message}`
|
|
963
1155
|
);
|
|
964
1156
|
this.body = body;
|
|
965
|
-
this.name = "
|
|
1157
|
+
this.name = "GroupEmptyError";
|
|
966
1158
|
}
|
|
967
|
-
static code = "
|
|
968
|
-
static statusCode =
|
|
969
|
-
static description = `
|
|
1159
|
+
static code = "GROUP_EMPTY";
|
|
1160
|
+
static statusCode = 400;
|
|
1161
|
+
static description = `Group cannot be empty if provided`;
|
|
970
1162
|
}
|
|
971
|
-
class
|
|
1163
|
+
class UserEmptyError extends Error {
|
|
972
1164
|
constructor(body) {
|
|
973
1165
|
super(
|
|
974
|
-
`
|
|
1166
|
+
`USER_EMPTY: ${body.message}`
|
|
975
1167
|
);
|
|
976
1168
|
this.body = body;
|
|
977
|
-
this.name = "
|
|
1169
|
+
this.name = "UserEmptyError";
|
|
978
1170
|
}
|
|
979
|
-
static code = "
|
|
980
|
-
static statusCode =
|
|
981
|
-
static description = `
|
|
1171
|
+
static code = "USER_EMPTY";
|
|
1172
|
+
static statusCode = 400;
|
|
1173
|
+
static description = `User cannot be empty if provided`;
|
|
982
1174
|
}
|
|
983
|
-
class
|
|
1175
|
+
class OnFailureArrayContainsEmptyError extends Error {
|
|
984
1176
|
constructor(body) {
|
|
985
1177
|
super(
|
|
986
|
-
`
|
|
1178
|
+
`ON_FAILURE_ARRAY_CONTAINS_EMPTY: ${body.message}`
|
|
987
1179
|
);
|
|
988
1180
|
this.body = body;
|
|
989
|
-
this.name = "
|
|
1181
|
+
this.name = "OnFailureArrayContainsEmptyError";
|
|
990
1182
|
}
|
|
991
|
-
static code = "
|
|
1183
|
+
static code = "ON_FAILURE_ARRAY_CONTAINS_EMPTY";
|
|
992
1184
|
static statusCode = 400;
|
|
993
|
-
static description = `
|
|
1185
|
+
static description = `'onFailure' array cannot contain empty strings`;
|
|
994
1186
|
}
|
|
995
|
-
class
|
|
1187
|
+
class RequiresArrayContainsEmptyError extends Error {
|
|
996
1188
|
constructor(body) {
|
|
997
1189
|
super(
|
|
998
|
-
`
|
|
999
|
-
);
|
|
1000
|
-
this.body = body;
|
|
1001
|
-
this.name = "CreateVmMemNotPowerOfTwoError";
|
|
1002
|
-
}
|
|
1003
|
-
static code = "CREATE_VM_MEM_NOT_POWER_OF_TWO";
|
|
1004
|
-
static statusCode = 400;
|
|
1005
|
-
static description = `memSizeMb must be a power of two in MiB (got {got} MiB)`;
|
|
1006
|
-
}
|
|
1007
|
-
class CreateVmVcpuNotPowerOfTwoError extends Error {
|
|
1008
|
-
constructor(body) {
|
|
1009
|
-
super(
|
|
1010
|
-
`CREATE_VM_VCPU_NOT_POWER_OF_TWO: ${body.message}`
|
|
1011
|
-
);
|
|
1012
|
-
this.body = body;
|
|
1013
|
-
this.name = "CreateVmVcpuNotPowerOfTwoError";
|
|
1014
|
-
}
|
|
1015
|
-
static code = "CREATE_VM_VCPU_NOT_POWER_OF_TWO";
|
|
1016
|
-
static statusCode = 400;
|
|
1017
|
-
static description = `vcpuCount must be a power of two (got {got})`;
|
|
1018
|
-
}
|
|
1019
|
-
class CreateVmRootfsOutOfRangeError extends Error {
|
|
1020
|
-
constructor(body) {
|
|
1021
|
-
super(
|
|
1022
|
-
`CREATE_VM_ROOTFS_OUT_OF_RANGE: ${body.message}`
|
|
1023
|
-
);
|
|
1024
|
-
this.body = body;
|
|
1025
|
-
this.name = "CreateVmRootfsOutOfRangeError";
|
|
1026
|
-
}
|
|
1027
|
-
static code = "CREATE_VM_ROOTFS_OUT_OF_RANGE";
|
|
1028
|
-
static statusCode = 400;
|
|
1029
|
-
static description = `rootfsSizeMb out of range (got {got} MB, allowed {min}..={max} MB)`;
|
|
1030
|
-
}
|
|
1031
|
-
class CreateVmMemOutOfRangeError extends Error {
|
|
1032
|
-
constructor(body) {
|
|
1033
|
-
super(
|
|
1034
|
-
`CREATE_VM_MEM_OUT_OF_RANGE: ${body.message}`
|
|
1035
|
-
);
|
|
1036
|
-
this.body = body;
|
|
1037
|
-
this.name = "CreateVmMemOutOfRangeError";
|
|
1038
|
-
}
|
|
1039
|
-
static code = "CREATE_VM_MEM_OUT_OF_RANGE";
|
|
1040
|
-
static statusCode = 400;
|
|
1041
|
-
static description = `memSizeMb out of range (got {got} MiB, allowed {min}..={max} MiB)`;
|
|
1042
|
-
}
|
|
1043
|
-
class CreateVmVcpuOutOfRangeError extends Error {
|
|
1044
|
-
constructor(body) {
|
|
1045
|
-
super(
|
|
1046
|
-
`CREATE_VM_VCPU_OUT_OF_RANGE: ${body.message}`
|
|
1047
|
-
);
|
|
1048
|
-
this.body = body;
|
|
1049
|
-
this.name = "CreateVmVcpuOutOfRangeError";
|
|
1050
|
-
}
|
|
1051
|
-
static code = "CREATE_VM_VCPU_OUT_OF_RANGE";
|
|
1052
|
-
static statusCode = 400;
|
|
1053
|
-
static description = `vcpuCount out of range (got {got}, allowed 1..={max})`;
|
|
1054
|
-
}
|
|
1055
|
-
class CreateVmBadRequestError extends Error {
|
|
1056
|
-
constructor(body) {
|
|
1057
|
-
super(
|
|
1058
|
-
`CREATE_VM_BAD_REQUEST: ${body.message}`
|
|
1059
|
-
);
|
|
1060
|
-
this.body = body;
|
|
1061
|
-
this.name = "CreateVmBadRequestError";
|
|
1062
|
-
}
|
|
1063
|
-
static code = "CREATE_VM_BAD_REQUEST";
|
|
1064
|
-
static statusCode = 400;
|
|
1065
|
-
static description = `Bad request: {message}`;
|
|
1066
|
-
}
|
|
1067
|
-
class VmSetupFailedError extends Error {
|
|
1068
|
-
constructor(body) {
|
|
1069
|
-
super(
|
|
1070
|
-
`VM_SETUP_FAILED: ${body.message}`
|
|
1071
|
-
);
|
|
1072
|
-
this.body = body;
|
|
1073
|
-
this.name = "VmSetupFailedError";
|
|
1074
|
-
}
|
|
1075
|
-
static code = "VM_SETUP_FAILED";
|
|
1076
|
-
static statusCode = 500;
|
|
1077
|
-
static description = `VM setup failed: {failed_reason}`;
|
|
1078
|
-
}
|
|
1079
|
-
class WantedByEmptyError extends Error {
|
|
1080
|
-
constructor(body) {
|
|
1081
|
-
super(
|
|
1082
|
-
`WANTED_BY_EMPTY: ${body.message}`
|
|
1083
|
-
);
|
|
1084
|
-
this.body = body;
|
|
1085
|
-
this.name = "WantedByEmptyError";
|
|
1086
|
-
}
|
|
1087
|
-
static code = "WANTED_BY_EMPTY";
|
|
1088
|
-
static statusCode = 400;
|
|
1089
|
-
static description = `wanted_by cannot be empty if provided`;
|
|
1090
|
-
}
|
|
1091
|
-
class WorkdirEmptyError extends Error {
|
|
1092
|
-
constructor(body) {
|
|
1093
|
-
super(
|
|
1094
|
-
`WORKDIR_EMPTY: ${body.message}`
|
|
1095
|
-
);
|
|
1096
|
-
this.body = body;
|
|
1097
|
-
this.name = "WorkdirEmptyError";
|
|
1098
|
-
}
|
|
1099
|
-
static code = "WORKDIR_EMPTY";
|
|
1100
|
-
static statusCode = 400;
|
|
1101
|
-
static description = `Working directory cannot be empty if provided`;
|
|
1102
|
-
}
|
|
1103
|
-
class GroupEmptyError extends Error {
|
|
1104
|
-
constructor(body) {
|
|
1105
|
-
super(
|
|
1106
|
-
`GROUP_EMPTY: ${body.message}`
|
|
1107
|
-
);
|
|
1108
|
-
this.body = body;
|
|
1109
|
-
this.name = "GroupEmptyError";
|
|
1110
|
-
}
|
|
1111
|
-
static code = "GROUP_EMPTY";
|
|
1112
|
-
static statusCode = 400;
|
|
1113
|
-
static description = `Group cannot be empty if provided`;
|
|
1114
|
-
}
|
|
1115
|
-
class UserEmptyError extends Error {
|
|
1116
|
-
constructor(body) {
|
|
1117
|
-
super(
|
|
1118
|
-
`USER_EMPTY: ${body.message}`
|
|
1119
|
-
);
|
|
1120
|
-
this.body = body;
|
|
1121
|
-
this.name = "UserEmptyError";
|
|
1122
|
-
}
|
|
1123
|
-
static code = "USER_EMPTY";
|
|
1124
|
-
static statusCode = 400;
|
|
1125
|
-
static description = `User cannot be empty if provided`;
|
|
1126
|
-
}
|
|
1127
|
-
class OnFailureArrayContainsEmptyError extends Error {
|
|
1128
|
-
constructor(body) {
|
|
1129
|
-
super(
|
|
1130
|
-
`ON_FAILURE_ARRAY_CONTAINS_EMPTY: ${body.message}`
|
|
1131
|
-
);
|
|
1132
|
-
this.body = body;
|
|
1133
|
-
this.name = "OnFailureArrayContainsEmptyError";
|
|
1134
|
-
}
|
|
1135
|
-
static code = "ON_FAILURE_ARRAY_CONTAINS_EMPTY";
|
|
1136
|
-
static statusCode = 400;
|
|
1137
|
-
static description = `'onFailure' array cannot contain empty strings`;
|
|
1138
|
-
}
|
|
1139
|
-
class RequiresArrayContainsEmptyError extends Error {
|
|
1140
|
-
constructor(body) {
|
|
1141
|
-
super(
|
|
1142
|
-
`REQUIRES_ARRAY_CONTAINS_EMPTY: ${body.message}`
|
|
1190
|
+
`REQUIRES_ARRAY_CONTAINS_EMPTY: ${body.message}`
|
|
1143
1191
|
);
|
|
1144
1192
|
this.body = body;
|
|
1145
1193
|
this.name = "RequiresArrayContainsEmptyError";
|
|
@@ -1388,185 +1436,173 @@ class ExpiredError extends Error {
|
|
|
1388
1436
|
static statusCode = 403;
|
|
1389
1437
|
static description = `Session has expired`;
|
|
1390
1438
|
}
|
|
1391
|
-
class
|
|
1439
|
+
class NotFoundError extends Error {
|
|
1392
1440
|
constructor(body) {
|
|
1393
1441
|
super(
|
|
1394
|
-
`
|
|
1442
|
+
`NOT_FOUND: ${body.message}`
|
|
1395
1443
|
);
|
|
1396
1444
|
this.body = body;
|
|
1397
|
-
this.name = "
|
|
1445
|
+
this.name = "NotFoundError";
|
|
1398
1446
|
}
|
|
1399
|
-
static code = "
|
|
1400
|
-
static statusCode =
|
|
1401
|
-
static description = `
|
|
1447
|
+
static code = "NOT_FOUND";
|
|
1448
|
+
static statusCode = 404;
|
|
1449
|
+
static description = `Repository not found`;
|
|
1402
1450
|
}
|
|
1403
|
-
class
|
|
1451
|
+
class TreeNotFoundError extends Error {
|
|
1404
1452
|
constructor(body) {
|
|
1405
1453
|
super(
|
|
1406
|
-
`
|
|
1454
|
+
`TREE_NOT_FOUND: ${body.message}`
|
|
1407
1455
|
);
|
|
1408
1456
|
this.body = body;
|
|
1409
|
-
this.name = "
|
|
1457
|
+
this.name = "TreeNotFoundError";
|
|
1410
1458
|
}
|
|
1411
|
-
static code = "
|
|
1412
|
-
static statusCode =
|
|
1413
|
-
static description = `
|
|
1459
|
+
static code = "TREE_NOT_FOUND";
|
|
1460
|
+
static statusCode = 404;
|
|
1461
|
+
static description = `Tree not found: {hash}`;
|
|
1414
1462
|
}
|
|
1415
|
-
class
|
|
1463
|
+
class BranchNotFoundError extends Error {
|
|
1416
1464
|
constructor(body) {
|
|
1417
1465
|
super(
|
|
1418
|
-
`
|
|
1466
|
+
`BRANCH_NOT_FOUND: ${body.message}`
|
|
1419
1467
|
);
|
|
1420
1468
|
this.body = body;
|
|
1421
|
-
this.name = "
|
|
1469
|
+
this.name = "BranchNotFoundError";
|
|
1422
1470
|
}
|
|
1423
|
-
static code = "
|
|
1424
|
-
static statusCode =
|
|
1425
|
-
static description = `
|
|
1471
|
+
static code = "BRANCH_NOT_FOUND";
|
|
1472
|
+
static statusCode = 404;
|
|
1473
|
+
static description = `Branch not found: {branch}`;
|
|
1426
1474
|
}
|
|
1427
|
-
class
|
|
1475
|
+
class CommitNotFoundError extends Error {
|
|
1428
1476
|
constructor(body) {
|
|
1429
1477
|
super(
|
|
1430
|
-
`
|
|
1478
|
+
`COMMIT_NOT_FOUND: ${body.message}`
|
|
1431
1479
|
);
|
|
1432
1480
|
this.body = body;
|
|
1433
|
-
this.name = "
|
|
1481
|
+
this.name = "CommitNotFoundError";
|
|
1434
1482
|
}
|
|
1435
|
-
static code = "
|
|
1436
|
-
static statusCode =
|
|
1437
|
-
static description = `
|
|
1483
|
+
static code = "COMMIT_NOT_FOUND";
|
|
1484
|
+
static statusCode = 404;
|
|
1485
|
+
static description = `Commit not found: {hash}`;
|
|
1438
1486
|
}
|
|
1439
|
-
class
|
|
1487
|
+
class ParentNotFoundError extends Error {
|
|
1440
1488
|
constructor(body) {
|
|
1441
1489
|
super(
|
|
1442
|
-
`
|
|
1490
|
+
`PARENT_NOT_FOUND: ${body.message}`
|
|
1443
1491
|
);
|
|
1444
1492
|
this.body = body;
|
|
1445
|
-
this.name = "
|
|
1493
|
+
this.name = "ParentNotFoundError";
|
|
1446
1494
|
}
|
|
1447
|
-
static code = "
|
|
1448
|
-
static statusCode =
|
|
1449
|
-
static description = `
|
|
1495
|
+
static code = "PARENT_NOT_FOUND";
|
|
1496
|
+
static statusCode = 404;
|
|
1497
|
+
static description = `Parent commit not found: {sha}`;
|
|
1450
1498
|
}
|
|
1451
|
-
class
|
|
1499
|
+
class NoDefaultBranchError extends Error {
|
|
1452
1500
|
constructor(body) {
|
|
1453
1501
|
super(
|
|
1454
|
-
`
|
|
1502
|
+
`NO_DEFAULT_BRANCH: ${body.message}`
|
|
1455
1503
|
);
|
|
1456
1504
|
this.body = body;
|
|
1457
|
-
this.name = "
|
|
1505
|
+
this.name = "NoDefaultBranchError";
|
|
1458
1506
|
}
|
|
1459
|
-
static code = "
|
|
1460
|
-
static statusCode =
|
|
1461
|
-
static description = `
|
|
1507
|
+
static code = "NO_DEFAULT_BRANCH";
|
|
1508
|
+
static statusCode = 404;
|
|
1509
|
+
static description = `Repository has no default branch configured`;
|
|
1462
1510
|
}
|
|
1463
|
-
class
|
|
1511
|
+
class InvalidBase64ContentError extends Error {
|
|
1464
1512
|
constructor(body) {
|
|
1465
1513
|
super(
|
|
1466
|
-
`
|
|
1514
|
+
`INVALID_BASE64_CONTENT: ${body.message}`
|
|
1467
1515
|
);
|
|
1468
1516
|
this.body = body;
|
|
1469
|
-
this.name = "
|
|
1517
|
+
this.name = "InvalidBase64ContentError";
|
|
1470
1518
|
}
|
|
1471
|
-
static code = "
|
|
1519
|
+
static code = "INVALID_BASE64_CONTENT";
|
|
1472
1520
|
static statusCode = 400;
|
|
1473
|
-
static description = `
|
|
1521
|
+
static description = `Invalid base64 content for file: {path}`;
|
|
1474
1522
|
}
|
|
1475
|
-
class
|
|
1523
|
+
class InvalidFileChangeError extends Error {
|
|
1476
1524
|
constructor(body) {
|
|
1477
1525
|
super(
|
|
1478
|
-
`
|
|
1526
|
+
`INVALID_FILE_CHANGE: ${body.message}`
|
|
1479
1527
|
);
|
|
1480
1528
|
this.body = body;
|
|
1481
|
-
this.name = "
|
|
1529
|
+
this.name = "InvalidFileChangeError";
|
|
1482
1530
|
}
|
|
1483
|
-
static code = "
|
|
1484
|
-
static statusCode =
|
|
1485
|
-
static description = `
|
|
1531
|
+
static code = "INVALID_FILE_CHANGE";
|
|
1532
|
+
static statusCode = 400;
|
|
1533
|
+
static description = `File change must have either content or deleted flag, not both: {path}`;
|
|
1486
1534
|
}
|
|
1487
|
-
class
|
|
1535
|
+
class InvalidFilePathError extends Error {
|
|
1488
1536
|
constructor(body) {
|
|
1489
1537
|
super(
|
|
1490
|
-
`
|
|
1538
|
+
`INVALID_FILE_PATH: ${body.message}`
|
|
1491
1539
|
);
|
|
1492
1540
|
this.body = body;
|
|
1493
|
-
this.name = "
|
|
1541
|
+
this.name = "InvalidFilePathError";
|
|
1494
1542
|
}
|
|
1495
|
-
static code = "
|
|
1496
|
-
static statusCode =
|
|
1497
|
-
static description = `
|
|
1543
|
+
static code = "INVALID_FILE_PATH";
|
|
1544
|
+
static statusCode = 400;
|
|
1545
|
+
static description = `Invalid file path: {path}`;
|
|
1498
1546
|
}
|
|
1499
|
-
class
|
|
1547
|
+
class ConflictingParentError extends Error {
|
|
1500
1548
|
constructor(body) {
|
|
1501
1549
|
super(
|
|
1502
|
-
`
|
|
1550
|
+
`CONFLICTING_PARENT: ${body.message}`
|
|
1503
1551
|
);
|
|
1504
1552
|
this.body = body;
|
|
1505
|
-
this.name = "
|
|
1553
|
+
this.name = "ConflictingParentError";
|
|
1506
1554
|
}
|
|
1507
|
-
static code = "
|
|
1508
|
-
static statusCode =
|
|
1509
|
-
static description = `
|
|
1510
|
-
}
|
|
1511
|
-
class BranchNotFoundError extends Error {
|
|
1512
|
-
constructor(body) {
|
|
1513
|
-
super(
|
|
1514
|
-
`BRANCH_NOT_FOUND: ${body.message}`
|
|
1515
|
-
);
|
|
1516
|
-
this.body = body;
|
|
1517
|
-
this.name = "BranchNotFoundError";
|
|
1518
|
-
}
|
|
1519
|
-
static code = "BRANCH_NOT_FOUND";
|
|
1520
|
-
static statusCode = 404;
|
|
1521
|
-
static description = `Branch not found: {branch}`;
|
|
1555
|
+
static code = "CONFLICTING_PARENT";
|
|
1556
|
+
static statusCode = 409;
|
|
1557
|
+
static description = `Conflict: expected parent SHA {expected} but current is {actual:?}`;
|
|
1522
1558
|
}
|
|
1523
|
-
class
|
|
1559
|
+
class AmbiguousError extends Error {
|
|
1524
1560
|
constructor(body) {
|
|
1525
1561
|
super(
|
|
1526
|
-
`
|
|
1562
|
+
`AMBIGUOUS: ${body.message}`
|
|
1527
1563
|
);
|
|
1528
1564
|
this.body = body;
|
|
1529
|
-
this.name = "
|
|
1565
|
+
this.name = "AmbiguousError";
|
|
1530
1566
|
}
|
|
1531
|
-
static code = "
|
|
1532
|
-
static statusCode =
|
|
1533
|
-
static description = `
|
|
1567
|
+
static code = "AMBIGUOUS";
|
|
1568
|
+
static statusCode = 400;
|
|
1569
|
+
static description = `rev is ambiguous: {rev}`;
|
|
1534
1570
|
}
|
|
1535
|
-
class
|
|
1571
|
+
class InvalidError extends Error {
|
|
1536
1572
|
constructor(body) {
|
|
1537
1573
|
super(
|
|
1538
|
-
`
|
|
1574
|
+
`INVALID: ${body.message}`
|
|
1539
1575
|
);
|
|
1540
1576
|
this.body = body;
|
|
1541
|
-
this.name = "
|
|
1577
|
+
this.name = "InvalidError";
|
|
1542
1578
|
}
|
|
1543
|
-
static code = "
|
|
1544
|
-
static statusCode =
|
|
1545
|
-
static description = `
|
|
1579
|
+
static code = "INVALID";
|
|
1580
|
+
static statusCode = 400;
|
|
1581
|
+
static description = `invalid rev syntax: {rev}`;
|
|
1546
1582
|
}
|
|
1547
|
-
class
|
|
1583
|
+
class ConflictError extends Error {
|
|
1548
1584
|
constructor(body) {
|
|
1549
1585
|
super(
|
|
1550
|
-
`
|
|
1586
|
+
`CONFLICT: ${body.message}`
|
|
1551
1587
|
);
|
|
1552
1588
|
this.body = body;
|
|
1553
|
-
this.name = "
|
|
1589
|
+
this.name = "ConflictError";
|
|
1554
1590
|
}
|
|
1555
|
-
static code = "
|
|
1556
|
-
static statusCode =
|
|
1557
|
-
static description = `
|
|
1591
|
+
static code = "CONFLICT";
|
|
1592
|
+
static statusCode = 409;
|
|
1593
|
+
static description = `Sync conflict: {message}`;
|
|
1558
1594
|
}
|
|
1559
|
-
class
|
|
1595
|
+
class BranchAlreadyExistsError extends Error {
|
|
1560
1596
|
constructor(body) {
|
|
1561
1597
|
super(
|
|
1562
|
-
`
|
|
1598
|
+
`BRANCH_ALREADY_EXISTS: ${body.message}`
|
|
1563
1599
|
);
|
|
1564
1600
|
this.body = body;
|
|
1565
|
-
this.name = "
|
|
1601
|
+
this.name = "BranchAlreadyExistsError";
|
|
1566
1602
|
}
|
|
1567
|
-
static code = "
|
|
1568
|
-
static statusCode =
|
|
1569
|
-
static description = `
|
|
1603
|
+
static code = "BRANCH_ALREADY_EXISTS";
|
|
1604
|
+
static statusCode = 409;
|
|
1605
|
+
static description = `Branch already exists: {branch}`;
|
|
1570
1606
|
}
|
|
1571
1607
|
class PathNotFoundError extends Error {
|
|
1572
1608
|
constructor(body) {
|
|
@@ -1616,6 +1652,162 @@ class ExpectedServiceError extends Error {
|
|
|
1616
1652
|
static statusCode = 403;
|
|
1617
1653
|
static description = `Expected 'service' query parameter`;
|
|
1618
1654
|
}
|
|
1655
|
+
class UnauthorizedError extends Error {
|
|
1656
|
+
constructor(body) {
|
|
1657
|
+
super(
|
|
1658
|
+
`UNAUTHORIZED: ${body.message}`
|
|
1659
|
+
);
|
|
1660
|
+
this.body = body;
|
|
1661
|
+
this.name = "UnauthorizedError";
|
|
1662
|
+
}
|
|
1663
|
+
static code = "UNAUTHORIZED";
|
|
1664
|
+
static statusCode = 401;
|
|
1665
|
+
static description = `Unauthorized: admin key and account id are required`;
|
|
1666
|
+
}
|
|
1667
|
+
class ForbiddenError extends Error {
|
|
1668
|
+
constructor(body) {
|
|
1669
|
+
super(
|
|
1670
|
+
`FORBIDDEN: ${body.message}`
|
|
1671
|
+
);
|
|
1672
|
+
this.body = body;
|
|
1673
|
+
this.name = "ForbiddenError";
|
|
1674
|
+
}
|
|
1675
|
+
static code = "FORBIDDEN";
|
|
1676
|
+
static statusCode = 403;
|
|
1677
|
+
static description = `Forbidden`;
|
|
1678
|
+
}
|
|
1679
|
+
class InvalidAccountIdError extends Error {
|
|
1680
|
+
constructor(body) {
|
|
1681
|
+
super(
|
|
1682
|
+
`INVALID_ACCOUNT_ID: ${body.message}`
|
|
1683
|
+
);
|
|
1684
|
+
this.body = body;
|
|
1685
|
+
this.name = "InvalidAccountIdError";
|
|
1686
|
+
}
|
|
1687
|
+
static code = "INVALID_ACCOUNT_ID";
|
|
1688
|
+
static statusCode = 400;
|
|
1689
|
+
static description = `Invalid account ID: {account_id}`;
|
|
1690
|
+
}
|
|
1691
|
+
class SourceImportConflictError extends Error {
|
|
1692
|
+
constructor(body) {
|
|
1693
|
+
super(
|
|
1694
|
+
`SOURCE_IMPORT_CONFLICT: ${body.message}`
|
|
1695
|
+
);
|
|
1696
|
+
this.body = body;
|
|
1697
|
+
this.name = "SourceImportConflictError";
|
|
1698
|
+
}
|
|
1699
|
+
static code = "SOURCE_IMPORT_CONFLICT";
|
|
1700
|
+
static statusCode = 400;
|
|
1701
|
+
static description = `Source and import are mutually exclusive`;
|
|
1702
|
+
}
|
|
1703
|
+
class SourceUnauthorizedError extends Error {
|
|
1704
|
+
constructor(body) {
|
|
1705
|
+
super(
|
|
1706
|
+
`SOURCE_UNAUTHORIZED: ${body.message}`
|
|
1707
|
+
);
|
|
1708
|
+
this.body = body;
|
|
1709
|
+
this.name = "SourceUnauthorizedError";
|
|
1710
|
+
}
|
|
1711
|
+
static code = "SOURCE_UNAUTHORIZED";
|
|
1712
|
+
static statusCode = 400;
|
|
1713
|
+
static description = `Unauthorized to access source repository at {url}`;
|
|
1714
|
+
}
|
|
1715
|
+
class SourceNotFoundError extends Error {
|
|
1716
|
+
constructor(body) {
|
|
1717
|
+
super(
|
|
1718
|
+
`SOURCE_NOT_FOUND: ${body.message}`
|
|
1719
|
+
);
|
|
1720
|
+
this.body = body;
|
|
1721
|
+
this.name = "SourceNotFoundError";
|
|
1722
|
+
}
|
|
1723
|
+
static code = "SOURCE_NOT_FOUND";
|
|
1724
|
+
static statusCode = 400;
|
|
1725
|
+
static description = `Source repository not found at {url}`;
|
|
1726
|
+
}
|
|
1727
|
+
class ImportSubdirNotFoundError extends Error {
|
|
1728
|
+
constructor(body) {
|
|
1729
|
+
super(
|
|
1730
|
+
`IMPORT_SUBDIR_NOT_FOUND: ${body.message}`
|
|
1731
|
+
);
|
|
1732
|
+
this.body = body;
|
|
1733
|
+
this.name = "ImportSubdirNotFoundError";
|
|
1734
|
+
}
|
|
1735
|
+
static code = "IMPORT_SUBDIR_NOT_FOUND";
|
|
1736
|
+
static statusCode = 400;
|
|
1737
|
+
static description = `Directory not found in {source}: {dir}`;
|
|
1738
|
+
}
|
|
1739
|
+
class RepoAlreadyExistsError extends Error {
|
|
1740
|
+
constructor(body) {
|
|
1741
|
+
super(
|
|
1742
|
+
`REPO_ALREADY_EXISTS: ${body.message}`
|
|
1743
|
+
);
|
|
1744
|
+
this.body = body;
|
|
1745
|
+
this.name = "RepoAlreadyExistsError";
|
|
1746
|
+
}
|
|
1747
|
+
static code = "REPO_ALREADY_EXISTS";
|
|
1748
|
+
static statusCode = 409;
|
|
1749
|
+
static description = `Repo '{repo_id}' already exists`;
|
|
1750
|
+
}
|
|
1751
|
+
class TagNotFoundError extends Error {
|
|
1752
|
+
constructor(body) {
|
|
1753
|
+
super(
|
|
1754
|
+
`TAG_NOT_FOUND: ${body.message}`
|
|
1755
|
+
);
|
|
1756
|
+
this.body = body;
|
|
1757
|
+
this.name = "TagNotFoundError";
|
|
1758
|
+
}
|
|
1759
|
+
static code = "TAG_NOT_FOUND";
|
|
1760
|
+
static statusCode = 404;
|
|
1761
|
+
static description = `Tag not found: {hash}`;
|
|
1762
|
+
}
|
|
1763
|
+
class InvalidRevisionError extends Error {
|
|
1764
|
+
constructor(body) {
|
|
1765
|
+
super(
|
|
1766
|
+
`INVALID_REVISION: ${body.message}`
|
|
1767
|
+
);
|
|
1768
|
+
this.body = body;
|
|
1769
|
+
this.name = "InvalidRevisionError";
|
|
1770
|
+
}
|
|
1771
|
+
static code = "INVALID_REVISION";
|
|
1772
|
+
static statusCode = 400;
|
|
1773
|
+
static description = `Invalid revision: {revision}`;
|
|
1774
|
+
}
|
|
1775
|
+
class BlobNotFoundError extends Error {
|
|
1776
|
+
constructor(body) {
|
|
1777
|
+
super(
|
|
1778
|
+
`BLOB_NOT_FOUND: ${body.message}`
|
|
1779
|
+
);
|
|
1780
|
+
this.body = body;
|
|
1781
|
+
this.name = "BlobNotFoundError";
|
|
1782
|
+
}
|
|
1783
|
+
static code = "BLOB_NOT_FOUND";
|
|
1784
|
+
static statusCode = 404;
|
|
1785
|
+
static description = `Blob not found: {hash}`;
|
|
1786
|
+
}
|
|
1787
|
+
class SendErrorError extends Error {
|
|
1788
|
+
constructor(body) {
|
|
1789
|
+
super(
|
|
1790
|
+
`SEND_ERROR: ${body.message}`
|
|
1791
|
+
);
|
|
1792
|
+
this.body = body;
|
|
1793
|
+
this.name = "SendErrorError";
|
|
1794
|
+
}
|
|
1795
|
+
static code = "SEND_ERROR";
|
|
1796
|
+
static statusCode = 500;
|
|
1797
|
+
static description = `Stream receiver dropped`;
|
|
1798
|
+
}
|
|
1799
|
+
class UnsupportedTransferError extends Error {
|
|
1800
|
+
constructor(body) {
|
|
1801
|
+
super(
|
|
1802
|
+
`UNSUPPORTED_TRANSFER: ${body.message}`
|
|
1803
|
+
);
|
|
1804
|
+
this.body = body;
|
|
1805
|
+
this.name = "UnsupportedTransferError";
|
|
1806
|
+
}
|
|
1807
|
+
static code = "UNSUPPORTED_TRANSFER";
|
|
1808
|
+
static statusCode = 400;
|
|
1809
|
+
static description = `Unsupported LFS transfer protocol(s)`;
|
|
1810
|
+
}
|
|
1619
1811
|
class DiffInvalidPathPatternError extends Error {
|
|
1620
1812
|
constructor(body) {
|
|
1621
1813
|
super(
|
|
@@ -1736,809 +1928,689 @@ class EmptyQueryError extends Error {
|
|
|
1736
1928
|
static statusCode = 400;
|
|
1737
1929
|
static description = `Query must not be empty`;
|
|
1738
1930
|
}
|
|
1739
|
-
class
|
|
1931
|
+
class PackfileError extends Error {
|
|
1740
1932
|
constructor(body) {
|
|
1741
1933
|
super(
|
|
1742
|
-
`
|
|
1934
|
+
`PACKFILE: ${body.message}`
|
|
1743
1935
|
);
|
|
1744
1936
|
this.body = body;
|
|
1745
|
-
this.name = "
|
|
1937
|
+
this.name = "PackfileError";
|
|
1746
1938
|
}
|
|
1747
|
-
static code = "
|
|
1748
|
-
static statusCode =
|
|
1749
|
-
static description = `
|
|
1939
|
+
static code = "PACKFILE";
|
|
1940
|
+
static statusCode = 500;
|
|
1941
|
+
static description = `Error building packfile`;
|
|
1750
1942
|
}
|
|
1751
|
-
class
|
|
1943
|
+
class InvalidRangeError extends Error {
|
|
1752
1944
|
constructor(body) {
|
|
1753
1945
|
super(
|
|
1754
|
-
`
|
|
1946
|
+
`INVALID_RANGE: ${body.message}`
|
|
1755
1947
|
);
|
|
1756
1948
|
this.body = body;
|
|
1757
|
-
this.name = "
|
|
1949
|
+
this.name = "InvalidRangeError";
|
|
1758
1950
|
}
|
|
1759
|
-
static code = "
|
|
1760
|
-
static statusCode =
|
|
1761
|
-
static description = `
|
|
1951
|
+
static code = "INVALID_RANGE";
|
|
1952
|
+
static statusCode = 400;
|
|
1953
|
+
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.`;
|
|
1762
1954
|
}
|
|
1763
|
-
class
|
|
1955
|
+
class OffsetWithSelectorError extends Error {
|
|
1764
1956
|
constructor(body) {
|
|
1765
1957
|
super(
|
|
1766
|
-
`
|
|
1958
|
+
`OFFSET_WITH_SELECTOR: ${body.message}`
|
|
1767
1959
|
);
|
|
1768
1960
|
this.body = body;
|
|
1769
|
-
this.name = "
|
|
1961
|
+
this.name = "OffsetWithSelectorError";
|
|
1770
1962
|
}
|
|
1771
|
-
static code = "
|
|
1963
|
+
static code = "OFFSET_WITH_SELECTOR";
|
|
1772
1964
|
static statusCode = 400;
|
|
1773
|
-
static description = `
|
|
1965
|
+
static description = `Cannot use 'offset' parameter together with 'since' or 'until'. Use 'since' for cursor-based pagination.`;
|
|
1774
1966
|
}
|
|
1775
|
-
class
|
|
1967
|
+
class CommitNotInBranchError extends Error {
|
|
1776
1968
|
constructor(body) {
|
|
1777
1969
|
super(
|
|
1778
|
-
`
|
|
1970
|
+
`COMMIT_NOT_IN_BRANCH: ${body.message}`
|
|
1779
1971
|
);
|
|
1780
1972
|
this.body = body;
|
|
1781
|
-
this.name = "
|
|
1973
|
+
this.name = "CommitNotInBranchError";
|
|
1782
1974
|
}
|
|
1783
|
-
static code = "
|
|
1975
|
+
static code = "COMMIT_NOT_IN_BRANCH";
|
|
1784
1976
|
static statusCode = 400;
|
|
1785
|
-
static description = `
|
|
1977
|
+
static description = `Commit {sha} is not in the history of branch {branch}`;
|
|
1786
1978
|
}
|
|
1787
|
-
class
|
|
1979
|
+
class GitHubSyncConflictError extends Error {
|
|
1788
1980
|
constructor(body) {
|
|
1789
1981
|
super(
|
|
1790
|
-
`
|
|
1982
|
+
`GIT_HUB_SYNC_CONFLICT: ${body.message}`
|
|
1791
1983
|
);
|
|
1792
1984
|
this.body = body;
|
|
1793
|
-
this.name = "
|
|
1985
|
+
this.name = "GitHubSyncConflictError";
|
|
1794
1986
|
}
|
|
1795
|
-
static code = "
|
|
1796
|
-
static statusCode =
|
|
1797
|
-
static description = `
|
|
1987
|
+
static code = "GIT_HUB_SYNC_CONFLICT";
|
|
1988
|
+
static statusCode = 409;
|
|
1989
|
+
static description = `GitHub Sync Conflict: {message}`;
|
|
1798
1990
|
}
|
|
1799
|
-
class
|
|
1991
|
+
class InvalidObjectIdError extends Error {
|
|
1800
1992
|
constructor(body) {
|
|
1801
1993
|
super(
|
|
1802
|
-
`
|
|
1994
|
+
`INVALID_OBJECT_ID: ${body.message}`
|
|
1803
1995
|
);
|
|
1804
1996
|
this.body = body;
|
|
1805
|
-
this.name = "
|
|
1997
|
+
this.name = "InvalidObjectIdError";
|
|
1806
1998
|
}
|
|
1807
|
-
static code = "
|
|
1808
|
-
static statusCode =
|
|
1809
|
-
static description = `
|
|
1999
|
+
static code = "INVALID_OBJECT_ID";
|
|
2000
|
+
static statusCode = 400;
|
|
2001
|
+
static description = `Invalid object ID: {hash}`;
|
|
1810
2002
|
}
|
|
1811
|
-
class
|
|
2003
|
+
class TooManyConcurrentRepairsError extends Error {
|
|
1812
2004
|
constructor(body) {
|
|
1813
2005
|
super(
|
|
1814
|
-
`
|
|
2006
|
+
`TOO_MANY_CONCURRENT_REPAIRS: ${body.message}`
|
|
1815
2007
|
);
|
|
1816
2008
|
this.body = body;
|
|
1817
|
-
this.name = "
|
|
2009
|
+
this.name = "TooManyConcurrentRepairsError";
|
|
1818
2010
|
}
|
|
1819
|
-
static code = "
|
|
1820
|
-
static statusCode =
|
|
1821
|
-
static description = `
|
|
2011
|
+
static code = "TOO_MANY_CONCURRENT_REPAIRS";
|
|
2012
|
+
static statusCode = 429;
|
|
2013
|
+
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`;
|
|
1822
2014
|
}
|
|
1823
|
-
class
|
|
2015
|
+
class AlreadyInProgressError extends Error {
|
|
1824
2016
|
constructor(body) {
|
|
1825
2017
|
super(
|
|
1826
|
-
`
|
|
2018
|
+
`ALREADY_IN_PROGRESS: ${body.message}`
|
|
1827
2019
|
);
|
|
1828
2020
|
this.body = body;
|
|
1829
|
-
this.name = "
|
|
2021
|
+
this.name = "AlreadyInProgressError";
|
|
1830
2022
|
}
|
|
1831
|
-
static code = "
|
|
2023
|
+
static code = "ALREADY_IN_PROGRESS";
|
|
1832
2024
|
static statusCode = 409;
|
|
1833
|
-
static description = `
|
|
2025
|
+
static description = `A repair job is already in progress for this repository: {existing_job_id}`;
|
|
1834
2026
|
}
|
|
1835
|
-
class
|
|
2027
|
+
class JobNotFoundError extends Error {
|
|
1836
2028
|
constructor(body) {
|
|
1837
2029
|
super(
|
|
1838
|
-
`
|
|
2030
|
+
`JOB_NOT_FOUND: ${body.message}`
|
|
1839
2031
|
);
|
|
1840
2032
|
this.body = body;
|
|
1841
|
-
this.name = "
|
|
2033
|
+
this.name = "JobNotFoundError";
|
|
1842
2034
|
}
|
|
1843
|
-
static code = "
|
|
2035
|
+
static code = "JOB_NOT_FOUND";
|
|
1844
2036
|
static statusCode = 404;
|
|
1845
|
-
static description = `
|
|
2037
|
+
static description = `Repair job not found: {job_id}`;
|
|
1846
2038
|
}
|
|
1847
|
-
class
|
|
2039
|
+
class UnavailableError extends Error {
|
|
1848
2040
|
constructor(body) {
|
|
1849
2041
|
super(
|
|
1850
|
-
`
|
|
2042
|
+
`UNAVAILABLE: ${body.message}`
|
|
1851
2043
|
);
|
|
1852
2044
|
this.body = body;
|
|
1853
|
-
this.name = "
|
|
2045
|
+
this.name = "UnavailableError";
|
|
1854
2046
|
}
|
|
1855
|
-
static code = "
|
|
1856
|
-
static statusCode =
|
|
1857
|
-
static description = `
|
|
2047
|
+
static code = "UNAVAILABLE";
|
|
2048
|
+
static statusCode = 503;
|
|
2049
|
+
static description = `Cron service unavailable`;
|
|
1858
2050
|
}
|
|
1859
|
-
class
|
|
2051
|
+
class ScheduleNotFoundError extends Error {
|
|
1860
2052
|
constructor(body) {
|
|
1861
2053
|
super(
|
|
1862
|
-
`
|
|
2054
|
+
`SCHEDULE_NOT_FOUND: ${body.message}`
|
|
1863
2055
|
);
|
|
1864
2056
|
this.body = body;
|
|
1865
|
-
this.name = "
|
|
2057
|
+
this.name = "ScheduleNotFoundError";
|
|
1866
2058
|
}
|
|
1867
|
-
static code = "
|
|
1868
|
-
static statusCode =
|
|
1869
|
-
static description = `
|
|
2059
|
+
static code = "SCHEDULE_NOT_FOUND";
|
|
2060
|
+
static statusCode = 404;
|
|
2061
|
+
static description = `Schedule not found`;
|
|
1870
2062
|
}
|
|
1871
|
-
class
|
|
2063
|
+
class ServiceUnavailableError extends Error {
|
|
1872
2064
|
constructor(body) {
|
|
1873
2065
|
super(
|
|
1874
|
-
`
|
|
2066
|
+
`SERVICE_UNAVAILABLE: ${body.message}`
|
|
1875
2067
|
);
|
|
1876
2068
|
this.body = body;
|
|
1877
|
-
this.name = "
|
|
2069
|
+
this.name = "ServiceUnavailableError";
|
|
1878
2070
|
}
|
|
1879
|
-
static code = "
|
|
1880
|
-
static statusCode =
|
|
1881
|
-
static description = `
|
|
2071
|
+
static code = "SERVICE_UNAVAILABLE";
|
|
2072
|
+
static statusCode = 503;
|
|
2073
|
+
static description = `Cron service not configured`;
|
|
1882
2074
|
}
|
|
1883
|
-
class
|
|
2075
|
+
class RepairAlreadyInProgressError extends Error {
|
|
1884
2076
|
constructor(body) {
|
|
1885
2077
|
super(
|
|
1886
|
-
`
|
|
2078
|
+
`REPAIR_ALREADY_IN_PROGRESS: ${body.message}`
|
|
1887
2079
|
);
|
|
1888
2080
|
this.body = body;
|
|
1889
|
-
this.name = "
|
|
2081
|
+
this.name = "RepairAlreadyInProgressError";
|
|
1890
2082
|
}
|
|
1891
|
-
static code = "
|
|
1892
|
-
static statusCode =
|
|
1893
|
-
static description = `
|
|
2083
|
+
static code = "REPAIR_ALREADY_IN_PROGRESS";
|
|
2084
|
+
static statusCode = 409;
|
|
2085
|
+
static description = `A repair job is already in progress for this repository: {existing_job_id}`;
|
|
1894
2086
|
}
|
|
1895
|
-
class
|
|
2087
|
+
class MemoryStorageQuotaExceededError extends Error {
|
|
1896
2088
|
constructor(body) {
|
|
1897
2089
|
super(
|
|
1898
|
-
`
|
|
2090
|
+
`MEMORY_STORAGE_QUOTA_EXCEEDED: ${body.message}`
|
|
1899
2091
|
);
|
|
1900
2092
|
this.body = body;
|
|
1901
|
-
this.name = "
|
|
2093
|
+
this.name = "MemoryStorageQuotaExceededError";
|
|
1902
2094
|
}
|
|
1903
|
-
static code = "
|
|
1904
|
-
static statusCode =
|
|
1905
|
-
static description = `
|
|
2095
|
+
static code = "MEMORY_STORAGE_QUOTA_EXCEEDED";
|
|
2096
|
+
static statusCode = 403;
|
|
2097
|
+
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`;
|
|
1906
2098
|
}
|
|
1907
|
-
class
|
|
2099
|
+
class RootfsStorageQuotaExceededError extends Error {
|
|
1908
2100
|
constructor(body) {
|
|
1909
2101
|
super(
|
|
1910
|
-
`
|
|
2102
|
+
`ROOTFS_STORAGE_QUOTA_EXCEEDED: ${body.message}`
|
|
1911
2103
|
);
|
|
1912
2104
|
this.body = body;
|
|
1913
|
-
this.name = "
|
|
2105
|
+
this.name = "RootfsStorageQuotaExceededError";
|
|
1914
2106
|
}
|
|
1915
|
-
static code = "
|
|
1916
|
-
static statusCode =
|
|
1917
|
-
static description = `
|
|
2107
|
+
static code = "ROOTFS_STORAGE_QUOTA_EXCEEDED";
|
|
2108
|
+
static statusCode = 403;
|
|
2109
|
+
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`;
|
|
1918
2110
|
}
|
|
1919
|
-
class
|
|
2111
|
+
class RootfsSizeTooLargeError extends Error {
|
|
1920
2112
|
constructor(body) {
|
|
1921
2113
|
super(
|
|
1922
|
-
`
|
|
2114
|
+
`ROOTFS_SIZE_TOO_LARGE: ${body.message}`
|
|
1923
2115
|
);
|
|
1924
2116
|
this.body = body;
|
|
1925
|
-
this.name = "
|
|
2117
|
+
this.name = "RootfsSizeTooLargeError";
|
|
1926
2118
|
}
|
|
1927
|
-
static code = "
|
|
2119
|
+
static code = "ROOTFS_SIZE_TOO_LARGE";
|
|
1928
2120
|
static statusCode = 400;
|
|
1929
|
-
static description = `
|
|
2121
|
+
static description = `rootfsSizeGb {got_gb} is too large`;
|
|
1930
2122
|
}
|
|
1931
|
-
class
|
|
2123
|
+
class MemSizeTooLargeError extends Error {
|
|
1932
2124
|
constructor(body) {
|
|
1933
2125
|
super(
|
|
1934
|
-
`
|
|
2126
|
+
`MEM_SIZE_TOO_LARGE: ${body.message}`
|
|
1935
2127
|
);
|
|
1936
2128
|
this.body = body;
|
|
1937
|
-
this.name = "
|
|
2129
|
+
this.name = "MemSizeTooLargeError";
|
|
1938
2130
|
}
|
|
1939
|
-
static code = "
|
|
1940
|
-
static statusCode =
|
|
1941
|
-
static description = `
|
|
2131
|
+
static code = "MEM_SIZE_TOO_LARGE";
|
|
2132
|
+
static statusCode = 400;
|
|
2133
|
+
static description = `memSizeGb {got_gb} is too large`;
|
|
1942
2134
|
}
|
|
1943
|
-
class
|
|
2135
|
+
class RootfsOverPlanLimitError extends Error {
|
|
1944
2136
|
constructor(body) {
|
|
1945
2137
|
super(
|
|
1946
|
-
`
|
|
2138
|
+
`ROOTFS_OVER_PLAN_LIMIT: ${body.message}`
|
|
1947
2139
|
);
|
|
1948
2140
|
this.body = body;
|
|
1949
|
-
this.name = "
|
|
2141
|
+
this.name = "RootfsOverPlanLimitError";
|
|
1950
2142
|
}
|
|
1951
|
-
static code = "
|
|
1952
|
-
static statusCode =
|
|
1953
|
-
static description = `
|
|
2143
|
+
static code = "ROOTFS_OVER_PLAN_LIMIT";
|
|
2144
|
+
static statusCode = 403;
|
|
2145
|
+
static description = `rootfsSizeMb {got} MB exceeds your plan's maximum of {max} MB`;
|
|
1954
2146
|
}
|
|
1955
|
-
class
|
|
2147
|
+
class MemOverPlanLimitError extends Error {
|
|
1956
2148
|
constructor(body) {
|
|
1957
2149
|
super(
|
|
1958
|
-
`
|
|
2150
|
+
`MEM_OVER_PLAN_LIMIT: ${body.message}`
|
|
1959
2151
|
);
|
|
1960
2152
|
this.body = body;
|
|
1961
|
-
this.name = "
|
|
2153
|
+
this.name = "MemOverPlanLimitError";
|
|
1962
2154
|
}
|
|
1963
|
-
static code = "
|
|
1964
|
-
static statusCode =
|
|
1965
|
-
static description = `
|
|
2155
|
+
static code = "MEM_OVER_PLAN_LIMIT";
|
|
2156
|
+
static statusCode = 403;
|
|
2157
|
+
static description = `memSizeMb {got} MiB exceeds your plan's maximum of {max} MiB`;
|
|
1966
2158
|
}
|
|
1967
|
-
class
|
|
2159
|
+
class VcpuOverPlanLimitError extends Error {
|
|
1968
2160
|
constructor(body) {
|
|
1969
2161
|
super(
|
|
1970
|
-
`
|
|
2162
|
+
`VCPU_OVER_PLAN_LIMIT: ${body.message}`
|
|
1971
2163
|
);
|
|
1972
2164
|
this.body = body;
|
|
1973
|
-
this.name = "
|
|
2165
|
+
this.name = "VcpuOverPlanLimitError";
|
|
1974
2166
|
}
|
|
1975
|
-
static code = "
|
|
1976
|
-
static statusCode =
|
|
1977
|
-
static description = `
|
|
2167
|
+
static code = "VCPU_OVER_PLAN_LIMIT";
|
|
2168
|
+
static statusCode = 403;
|
|
2169
|
+
static description = `vcpuCount {got} exceeds your plan's maximum of {max}`;
|
|
1978
2170
|
}
|
|
1979
|
-
class
|
|
2171
|
+
class CustomSizingNotAllowedError extends Error {
|
|
1980
2172
|
constructor(body) {
|
|
1981
2173
|
super(
|
|
1982
|
-
`
|
|
2174
|
+
`CUSTOM_SIZING_NOT_ALLOWED: ${body.message}`
|
|
1983
2175
|
);
|
|
1984
2176
|
this.body = body;
|
|
1985
|
-
this.name = "
|
|
2177
|
+
this.name = "CustomSizingNotAllowedError";
|
|
1986
2178
|
}
|
|
1987
|
-
static code = "
|
|
1988
|
-
static statusCode =
|
|
1989
|
-
static description = `
|
|
2179
|
+
static code = "CUSTOM_SIZING_NOT_ALLOWED";
|
|
2180
|
+
static statusCode = 403;
|
|
2181
|
+
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.`;
|
|
1990
2182
|
}
|
|
1991
|
-
class
|
|
2183
|
+
class SnapshotLimitExceededError extends Error {
|
|
1992
2184
|
constructor(body) {
|
|
1993
2185
|
super(
|
|
1994
|
-
`
|
|
2186
|
+
`SNAPSHOT_LIMIT_EXCEEDED: ${body.message}`
|
|
1995
2187
|
);
|
|
1996
2188
|
this.body = body;
|
|
1997
|
-
this.name = "
|
|
2189
|
+
this.name = "SnapshotLimitExceededError";
|
|
1998
2190
|
}
|
|
1999
|
-
static code = "
|
|
2191
|
+
static code = "SNAPSHOT_LIMIT_EXCEEDED";
|
|
2000
2192
|
static statusCode = 403;
|
|
2001
|
-
static description = `
|
|
2193
|
+
static description = `Snapshot limit exceeded: your plan allows {limit} total snapshots, you currently have {current}`;
|
|
2002
2194
|
}
|
|
2003
|
-
class
|
|
2195
|
+
class PersistentVmsNotAllowedError extends Error {
|
|
2004
2196
|
constructor(body) {
|
|
2005
2197
|
super(
|
|
2006
|
-
`
|
|
2198
|
+
`PERSISTENT_VMS_NOT_ALLOWED: ${body.message}`
|
|
2007
2199
|
);
|
|
2008
2200
|
this.body = body;
|
|
2009
|
-
this.name = "
|
|
2201
|
+
this.name = "PersistentVmsNotAllowedError";
|
|
2010
2202
|
}
|
|
2011
|
-
static code = "
|
|
2012
|
-
static statusCode =
|
|
2013
|
-
static description = `
|
|
2203
|
+
static code = "PERSISTENT_VMS_NOT_ALLOWED";
|
|
2204
|
+
static statusCode = 403;
|
|
2205
|
+
static description = `Your plan does not allow persistent VMs. Use sticky or ephemeral persistence instead, or upgrade your plan.`;
|
|
2014
2206
|
}
|
|
2015
|
-
class
|
|
2207
|
+
class TotalVmLimitExceededError extends Error {
|
|
2016
2208
|
constructor(body) {
|
|
2017
2209
|
super(
|
|
2018
|
-
`
|
|
2210
|
+
`TOTAL_VM_LIMIT_EXCEEDED: ${body.message}`
|
|
2019
2211
|
);
|
|
2020
2212
|
this.body = body;
|
|
2021
|
-
this.name = "
|
|
2213
|
+
this.name = "TotalVmLimitExceededError";
|
|
2022
2214
|
}
|
|
2023
|
-
static code = "
|
|
2024
|
-
static statusCode =
|
|
2025
|
-
static description = `
|
|
2215
|
+
static code = "TOTAL_VM_LIMIT_EXCEEDED";
|
|
2216
|
+
static statusCode = 403;
|
|
2217
|
+
static description = `Total VM limit exceeded: your plan allows {limit} total VMs, you currently have {current}`;
|
|
2026
2218
|
}
|
|
2027
|
-
class
|
|
2219
|
+
class VmLimitExceededError extends Error {
|
|
2028
2220
|
constructor(body) {
|
|
2029
2221
|
super(
|
|
2030
|
-
`
|
|
2222
|
+
`VM_LIMIT_EXCEEDED: ${body.message}`
|
|
2031
2223
|
);
|
|
2032
2224
|
this.body = body;
|
|
2033
|
-
this.name = "
|
|
2225
|
+
this.name = "VmLimitExceededError";
|
|
2034
2226
|
}
|
|
2035
|
-
static code = "
|
|
2036
|
-
static statusCode =
|
|
2037
|
-
static description = `
|
|
2227
|
+
static code = "VM_LIMIT_EXCEEDED";
|
|
2228
|
+
static statusCode = 403;
|
|
2229
|
+
static description = `VM limit exceeded: your plan allows {limit} active VMs, you currently have {current}`;
|
|
2038
2230
|
}
|
|
2039
|
-
class
|
|
2231
|
+
class ObservabilityDatabaseErrorError extends Error {
|
|
2040
2232
|
constructor(body) {
|
|
2041
2233
|
super(
|
|
2042
|
-
`
|
|
2234
|
+
`OBSERVABILITY_DATABASE_ERROR: ${body.message}`
|
|
2043
2235
|
);
|
|
2044
2236
|
this.body = body;
|
|
2045
|
-
this.name = "
|
|
2237
|
+
this.name = "ObservabilityDatabaseErrorError";
|
|
2046
2238
|
}
|
|
2047
|
-
static code = "
|
|
2239
|
+
static code = "OBSERVABILITY_DATABASE_ERROR";
|
|
2048
2240
|
static statusCode = 500;
|
|
2049
|
-
static description = `
|
|
2241
|
+
static description = `Database operation failed: {message}`;
|
|
2050
2242
|
}
|
|
2051
|
-
class
|
|
2243
|
+
class ObservabilityAccessDeniedError extends Error {
|
|
2052
2244
|
constructor(body) {
|
|
2053
2245
|
super(
|
|
2054
|
-
`
|
|
2246
|
+
`OBSERVABILITY_ACCESS_DENIED: ${body.message}`
|
|
2055
2247
|
);
|
|
2056
2248
|
this.body = body;
|
|
2057
|
-
this.name = "
|
|
2249
|
+
this.name = "ObservabilityAccessDeniedError";
|
|
2058
2250
|
}
|
|
2059
|
-
static code = "
|
|
2060
|
-
static statusCode =
|
|
2061
|
-
static description = `
|
|
2251
|
+
static code = "OBSERVABILITY_ACCESS_DENIED";
|
|
2252
|
+
static statusCode = 403;
|
|
2253
|
+
static description = `Access denied to logs for deployment: {deployment_id}`;
|
|
2062
2254
|
}
|
|
2063
|
-
class
|
|
2255
|
+
class ParseLogsFailedError extends Error {
|
|
2064
2256
|
constructor(body) {
|
|
2065
2257
|
super(
|
|
2066
|
-
`
|
|
2258
|
+
`PARSE_LOGS_FAILED: ${body.message}`
|
|
2067
2259
|
);
|
|
2068
2260
|
this.body = body;
|
|
2069
|
-
this.name = "
|
|
2261
|
+
this.name = "ParseLogsFailedError";
|
|
2070
2262
|
}
|
|
2071
|
-
static code = "
|
|
2263
|
+
static code = "PARSE_LOGS_FAILED";
|
|
2072
2264
|
static statusCode = 500;
|
|
2073
|
-
static description = `Failed to
|
|
2265
|
+
static description = `Failed to parse logs: {message}`;
|
|
2074
2266
|
}
|
|
2075
|
-
class
|
|
2267
|
+
class RetrieveLogsFailedError extends Error {
|
|
2076
2268
|
constructor(body) {
|
|
2077
2269
|
super(
|
|
2078
|
-
`
|
|
2270
|
+
`RETRIEVE_LOGS_FAILED: ${body.message}`
|
|
2079
2271
|
);
|
|
2080
2272
|
this.body = body;
|
|
2081
|
-
this.name = "
|
|
2273
|
+
this.name = "RetrieveLogsFailedError";
|
|
2082
2274
|
}
|
|
2083
|
-
static code = "
|
|
2275
|
+
static code = "RETRIEVE_LOGS_FAILED";
|
|
2084
2276
|
static statusCode = 500;
|
|
2085
|
-
static description = `Failed to
|
|
2277
|
+
static description = `Failed to retrieve logs: {message}`;
|
|
2086
2278
|
}
|
|
2087
|
-
class
|
|
2279
|
+
class InvalidQueryError extends Error {
|
|
2088
2280
|
constructor(body) {
|
|
2089
2281
|
super(
|
|
2090
|
-
`
|
|
2282
|
+
`INVALID_QUERY: ${body.message}`
|
|
2091
2283
|
);
|
|
2092
2284
|
this.body = body;
|
|
2093
|
-
this.name = "
|
|
2285
|
+
this.name = "InvalidQueryError";
|
|
2094
2286
|
}
|
|
2095
|
-
static code = "
|
|
2096
|
-
static statusCode =
|
|
2097
|
-
static description = `
|
|
2287
|
+
static code = "INVALID_QUERY";
|
|
2288
|
+
static statusCode = 400;
|
|
2289
|
+
static description = `Invalid log query: {message}`;
|
|
2098
2290
|
}
|
|
2099
|
-
class
|
|
2291
|
+
class LogsNotFoundError extends Error {
|
|
2100
2292
|
constructor(body) {
|
|
2101
2293
|
super(
|
|
2102
|
-
`
|
|
2294
|
+
`LOGS_NOT_FOUND: ${body.message}`
|
|
2103
2295
|
);
|
|
2104
2296
|
this.body = body;
|
|
2105
|
-
this.name = "
|
|
2297
|
+
this.name = "LogsNotFoundError";
|
|
2106
2298
|
}
|
|
2107
|
-
static code = "
|
|
2108
|
-
static statusCode =
|
|
2109
|
-
static description = `
|
|
2299
|
+
static code = "LOGS_NOT_FOUND";
|
|
2300
|
+
static statusCode = 404;
|
|
2301
|
+
static description = `Logs not found for deployment: {deployment_id}`;
|
|
2110
2302
|
}
|
|
2111
|
-
class
|
|
2303
|
+
class TriggerErrorError extends Error {
|
|
2112
2304
|
constructor(body) {
|
|
2113
2305
|
super(
|
|
2114
|
-
`
|
|
2306
|
+
`TRIGGER_ERROR: ${body.message}`
|
|
2115
2307
|
);
|
|
2116
2308
|
this.body = body;
|
|
2117
|
-
this.name = "
|
|
2309
|
+
this.name = "TriggerErrorError";
|
|
2118
2310
|
}
|
|
2119
|
-
static code = "
|
|
2311
|
+
static code = "TRIGGER_ERROR";
|
|
2120
2312
|
static statusCode = 500;
|
|
2121
|
-
static description = `Failed to
|
|
2313
|
+
static description = `Failed to manage triggers: {message}`;
|
|
2122
2314
|
}
|
|
2123
|
-
class
|
|
2315
|
+
class TokenErrorError extends Error {
|
|
2124
2316
|
constructor(body) {
|
|
2125
2317
|
super(
|
|
2126
|
-
`
|
|
2318
|
+
`TOKEN_ERROR: ${body.message}`
|
|
2127
2319
|
);
|
|
2128
2320
|
this.body = body;
|
|
2129
|
-
this.name = "
|
|
2321
|
+
this.name = "TokenErrorError";
|
|
2130
2322
|
}
|
|
2131
|
-
static code = "
|
|
2323
|
+
static code = "TOKEN_ERROR";
|
|
2132
2324
|
static statusCode = 500;
|
|
2133
|
-
static description = `Failed to
|
|
2325
|
+
static description = `Failed to manage tokens: {message}`;
|
|
2134
2326
|
}
|
|
2135
|
-
class
|
|
2327
|
+
class PermissionErrorError extends Error {
|
|
2136
2328
|
constructor(body) {
|
|
2137
2329
|
super(
|
|
2138
|
-
`
|
|
2330
|
+
`PERMISSION_ERROR: ${body.message}`
|
|
2139
2331
|
);
|
|
2140
2332
|
this.body = body;
|
|
2141
|
-
this.name = "
|
|
2333
|
+
this.name = "PermissionErrorError";
|
|
2142
2334
|
}
|
|
2143
|
-
static code = "
|
|
2335
|
+
static code = "PERMISSION_ERROR";
|
|
2144
2336
|
static statusCode = 500;
|
|
2145
|
-
static description = `Failed to
|
|
2146
|
-
}
|
|
2147
|
-
class VmPermissionNotFoundError extends Error {
|
|
2148
|
-
constructor(body) {
|
|
2149
|
-
super(
|
|
2150
|
-
`VM_PERMISSION_NOT_FOUND: ${body.message}`
|
|
2151
|
-
);
|
|
2152
|
-
this.body = body;
|
|
2153
|
-
this.name = "VmPermissionNotFoundError";
|
|
2154
|
-
}
|
|
2155
|
-
static code = "VM_PERMISSION_NOT_FOUND";
|
|
2156
|
-
static statusCode = 404;
|
|
2157
|
-
static description = `VM permission not found`;
|
|
2337
|
+
static description = `Failed to manage permissions: {message}`;
|
|
2158
2338
|
}
|
|
2159
|
-
class
|
|
2339
|
+
class IdentityErrorError extends Error {
|
|
2160
2340
|
constructor(body) {
|
|
2161
2341
|
super(
|
|
2162
|
-
`
|
|
2342
|
+
`IDENTITY_ERROR: ${body.message}`
|
|
2163
2343
|
);
|
|
2164
2344
|
this.body = body;
|
|
2165
|
-
this.name = "
|
|
2345
|
+
this.name = "IdentityErrorError";
|
|
2166
2346
|
}
|
|
2167
|
-
static code = "
|
|
2168
|
-
static statusCode =
|
|
2169
|
-
static description = `
|
|
2347
|
+
static code = "IDENTITY_ERROR";
|
|
2348
|
+
static statusCode = 500;
|
|
2349
|
+
static description = `Failed to manage identity: {message}`;
|
|
2170
2350
|
}
|
|
2171
|
-
class
|
|
2351
|
+
class GetContentFailedError extends Error {
|
|
2172
2352
|
constructor(body) {
|
|
2173
2353
|
super(
|
|
2174
|
-
`
|
|
2354
|
+
`GET_CONTENT_FAILED: ${body.message}`
|
|
2175
2355
|
);
|
|
2176
2356
|
this.body = body;
|
|
2177
|
-
this.name = "
|
|
2357
|
+
this.name = "GetContentFailedError";
|
|
2178
2358
|
}
|
|
2179
|
-
static code = "
|
|
2180
|
-
static statusCode =
|
|
2181
|
-
static description = `
|
|
2359
|
+
static code = "GET_CONTENT_FAILED";
|
|
2360
|
+
static statusCode = 500;
|
|
2361
|
+
static description = `Failed to get content: {message}`;
|
|
2182
2362
|
}
|
|
2183
|
-
class
|
|
2363
|
+
class ContentNotFoundError extends Error {
|
|
2184
2364
|
constructor(body) {
|
|
2185
2365
|
super(
|
|
2186
|
-
`
|
|
2366
|
+
`CONTENT_NOT_FOUND: ${body.message}`
|
|
2187
2367
|
);
|
|
2188
2368
|
this.body = body;
|
|
2189
|
-
this.name = "
|
|
2369
|
+
this.name = "ContentNotFoundError";
|
|
2190
2370
|
}
|
|
2191
|
-
static code = "
|
|
2371
|
+
static code = "CONTENT_NOT_FOUND";
|
|
2192
2372
|
static statusCode = 404;
|
|
2193
|
-
static description = `
|
|
2194
|
-
}
|
|
2195
|
-
class CannotDeleteManagedIdentityError extends Error {
|
|
2196
|
-
constructor(body) {
|
|
2197
|
-
super(
|
|
2198
|
-
`CANNOT_DELETE_MANAGED_IDENTITY: ${body.message}`
|
|
2199
|
-
);
|
|
2200
|
-
this.body = body;
|
|
2201
|
-
this.name = "CannotDeleteManagedIdentityError";
|
|
2202
|
-
}
|
|
2203
|
-
static code = "CANNOT_DELETE_MANAGED_IDENTITY";
|
|
2204
|
-
static statusCode = 403;
|
|
2205
|
-
static description = `Cannot delete managed identities`;
|
|
2206
|
-
}
|
|
2207
|
-
class CannotModifyManagedIdentityError extends Error {
|
|
2208
|
-
constructor(body) {
|
|
2209
|
-
super(
|
|
2210
|
-
`CANNOT_MODIFY_MANAGED_IDENTITY: ${body.message}`
|
|
2211
|
-
);
|
|
2212
|
-
this.body = body;
|
|
2213
|
-
this.name = "CannotModifyManagedIdentityError";
|
|
2214
|
-
}
|
|
2215
|
-
static code = "CANNOT_MODIFY_MANAGED_IDENTITY";
|
|
2216
|
-
static statusCode = 403;
|
|
2217
|
-
static description = `Cannot modify managed identities`;
|
|
2373
|
+
static description = `Content not found: {path}`;
|
|
2218
2374
|
}
|
|
2219
|
-
class
|
|
2375
|
+
class DownloadFailedError extends Error {
|
|
2220
2376
|
constructor(body) {
|
|
2221
2377
|
super(
|
|
2222
|
-
`
|
|
2378
|
+
`DOWNLOAD_FAILED: ${body.message}`
|
|
2223
2379
|
);
|
|
2224
2380
|
this.body = body;
|
|
2225
|
-
this.name = "
|
|
2381
|
+
this.name = "DownloadFailedError";
|
|
2226
2382
|
}
|
|
2227
|
-
static code = "
|
|
2228
|
-
static statusCode =
|
|
2229
|
-
static description = `
|
|
2383
|
+
static code = "DOWNLOAD_FAILED";
|
|
2384
|
+
static statusCode = 500;
|
|
2385
|
+
static description = `Failed to download repository: {message}`;
|
|
2230
2386
|
}
|
|
2231
|
-
class
|
|
2387
|
+
class GitServerErrorError extends Error {
|
|
2232
2388
|
constructor(body) {
|
|
2233
2389
|
super(
|
|
2234
|
-
`
|
|
2390
|
+
`GIT_SERVER_ERROR: ${body.message}`
|
|
2235
2391
|
);
|
|
2236
2392
|
this.body = body;
|
|
2237
|
-
this.name = "
|
|
2393
|
+
this.name = "GitServerErrorError";
|
|
2238
2394
|
}
|
|
2239
|
-
static code = "
|
|
2240
|
-
static statusCode =
|
|
2241
|
-
static description = `
|
|
2395
|
+
static code = "GIT_SERVER_ERROR";
|
|
2396
|
+
static statusCode = 500;
|
|
2397
|
+
static description = `Git server error: {message}`;
|
|
2242
2398
|
}
|
|
2243
|
-
class
|
|
2399
|
+
class ParseResponseErrorError extends Error {
|
|
2244
2400
|
constructor(body) {
|
|
2245
2401
|
super(
|
|
2246
|
-
`
|
|
2402
|
+
`PARSE_RESPONSE_ERROR: ${body.message}`
|
|
2247
2403
|
);
|
|
2248
2404
|
this.body = body;
|
|
2249
|
-
this.name = "
|
|
2405
|
+
this.name = "ParseResponseErrorError";
|
|
2250
2406
|
}
|
|
2251
|
-
static code = "
|
|
2252
|
-
static statusCode =
|
|
2253
|
-
static description = `
|
|
2407
|
+
static code = "PARSE_RESPONSE_ERROR";
|
|
2408
|
+
static statusCode = 500;
|
|
2409
|
+
static description = `Failed to parse response from Git server: {message}`;
|
|
2254
2410
|
}
|
|
2255
|
-
class
|
|
2411
|
+
class RepositoryAccessDeniedError extends Error {
|
|
2256
2412
|
constructor(body) {
|
|
2257
2413
|
super(
|
|
2258
|
-
`
|
|
2414
|
+
`REPOSITORY_ACCESS_DENIED: ${body.message}`
|
|
2259
2415
|
);
|
|
2260
2416
|
this.body = body;
|
|
2261
|
-
this.name = "
|
|
2417
|
+
this.name = "RepositoryAccessDeniedError";
|
|
2262
2418
|
}
|
|
2263
|
-
static code = "
|
|
2419
|
+
static code = "REPOSITORY_ACCESS_DENIED";
|
|
2264
2420
|
static statusCode = 403;
|
|
2265
|
-
static description = `
|
|
2266
|
-
}
|
|
2267
|
-
class FailedToProvisionCertificateError extends Error {
|
|
2268
|
-
constructor(body) {
|
|
2269
|
-
super(
|
|
2270
|
-
`FAILED_TO_PROVISION_CERTIFICATE: ${body.message}`
|
|
2271
|
-
);
|
|
2272
|
-
this.body = body;
|
|
2273
|
-
this.name = "FailedToProvisionCertificateError";
|
|
2274
|
-
}
|
|
2275
|
-
static code = "FAILED_TO_PROVISION_CERTIFICATE";
|
|
2276
|
-
static statusCode = 422;
|
|
2277
|
-
static description = `Failed to provision certificate: {message}`;
|
|
2421
|
+
static description = `Repository does not belong to account`;
|
|
2278
2422
|
}
|
|
2279
|
-
class
|
|
2423
|
+
class GitHubSyncFailedError extends Error {
|
|
2280
2424
|
constructor(body) {
|
|
2281
2425
|
super(
|
|
2282
|
-
`
|
|
2426
|
+
`GIT_HUB_SYNC_FAILED: ${body.message}`
|
|
2283
2427
|
);
|
|
2284
2428
|
this.body = body;
|
|
2285
|
-
this.name = "
|
|
2429
|
+
this.name = "GitHubSyncFailedError";
|
|
2286
2430
|
}
|
|
2287
|
-
static code = "
|
|
2431
|
+
static code = "GIT_HUB_SYNC_FAILED";
|
|
2288
2432
|
static statusCode = 500;
|
|
2289
|
-
static description = `Failed to
|
|
2290
|
-
}
|
|
2291
|
-
class PermissionDeniedError extends Error {
|
|
2292
|
-
constructor(body) {
|
|
2293
|
-
super(
|
|
2294
|
-
`PERMISSION_DENIED: ${body.message}`
|
|
2295
|
-
);
|
|
2296
|
-
this.body = body;
|
|
2297
|
-
this.name = "PermissionDeniedError";
|
|
2298
|
-
}
|
|
2299
|
-
static code = "PERMISSION_DENIED";
|
|
2300
|
-
static statusCode = 401;
|
|
2301
|
-
static description = `Permission denied: {message}`;
|
|
2302
|
-
}
|
|
2303
|
-
class FailedToCheckPermissionsError extends Error {
|
|
2304
|
-
constructor(body) {
|
|
2305
|
-
super(
|
|
2306
|
-
`FAILED_TO_CHECK_PERMISSIONS: ${body.message}`
|
|
2307
|
-
);
|
|
2308
|
-
this.body = body;
|
|
2309
|
-
this.name = "FailedToCheckPermissionsError";
|
|
2310
|
-
}
|
|
2311
|
-
static code = "FAILED_TO_CHECK_PERMISSIONS";
|
|
2312
|
-
static statusCode = 502;
|
|
2313
|
-
static description = `Failed to check permissions: {message}`;
|
|
2433
|
+
static description = `Failed to configure GitHub sync: {message}`;
|
|
2314
2434
|
}
|
|
2315
|
-
class
|
|
2435
|
+
class UpdateDefaultBranchFailedError extends Error {
|
|
2316
2436
|
constructor(body) {
|
|
2317
2437
|
super(
|
|
2318
|
-
`
|
|
2438
|
+
`UPDATE_DEFAULT_BRANCH_FAILED: ${body.message}`
|
|
2319
2439
|
);
|
|
2320
2440
|
this.body = body;
|
|
2321
|
-
this.name = "
|
|
2441
|
+
this.name = "UpdateDefaultBranchFailedError";
|
|
2322
2442
|
}
|
|
2323
|
-
static code = "
|
|
2443
|
+
static code = "UPDATE_DEFAULT_BRANCH_FAILED";
|
|
2324
2444
|
static statusCode = 500;
|
|
2325
|
-
static description = `Failed to
|
|
2445
|
+
static description = `Failed to update default branch: {message}`;
|
|
2326
2446
|
}
|
|
2327
|
-
class
|
|
2447
|
+
class GetRepositoryInfoFailedError extends Error {
|
|
2328
2448
|
constructor(body) {
|
|
2329
2449
|
super(
|
|
2330
|
-
`
|
|
2450
|
+
`GET_REPOSITORY_INFO_FAILED: ${body.message}`
|
|
2331
2451
|
);
|
|
2332
2452
|
this.body = body;
|
|
2333
|
-
this.name = "
|
|
2453
|
+
this.name = "GetRepositoryInfoFailedError";
|
|
2334
2454
|
}
|
|
2335
|
-
static code = "
|
|
2455
|
+
static code = "GET_REPOSITORY_INFO_FAILED";
|
|
2336
2456
|
static statusCode = 500;
|
|
2337
|
-
static description = `Failed to
|
|
2457
|
+
static description = `Failed to get repository info: {message}`;
|
|
2338
2458
|
}
|
|
2339
|
-
class
|
|
2459
|
+
class ListRepositoriesFailedError extends Error {
|
|
2340
2460
|
constructor(body) {
|
|
2341
2461
|
super(
|
|
2342
|
-
`
|
|
2462
|
+
`LIST_REPOSITORIES_FAILED: ${body.message}`
|
|
2343
2463
|
);
|
|
2344
2464
|
this.body = body;
|
|
2345
|
-
this.name = "
|
|
2465
|
+
this.name = "ListRepositoriesFailedError";
|
|
2346
2466
|
}
|
|
2347
|
-
static code = "
|
|
2467
|
+
static code = "LIST_REPOSITORIES_FAILED";
|
|
2348
2468
|
static statusCode = 500;
|
|
2349
|
-
static description = `Failed to
|
|
2350
|
-
}
|
|
2351
|
-
class VerificationFailedError extends Error {
|
|
2352
|
-
constructor(body) {
|
|
2353
|
-
super(
|
|
2354
|
-
`VERIFICATION_FAILED: ${body.message}`
|
|
2355
|
-
);
|
|
2356
|
-
this.body = body;
|
|
2357
|
-
this.name = "VerificationFailedError";
|
|
2358
|
-
}
|
|
2359
|
-
static code = "VERIFICATION_FAILED";
|
|
2360
|
-
static statusCode = 400;
|
|
2361
|
-
static description = `Domain verification failed: {message}`;
|
|
2469
|
+
static description = `Failed to list repositories: {message}`;
|
|
2362
2470
|
}
|
|
2363
|
-
class
|
|
2471
|
+
class DeleteRepositoryFailedError extends Error {
|
|
2364
2472
|
constructor(body) {
|
|
2365
2473
|
super(
|
|
2366
|
-
`
|
|
2474
|
+
`DELETE_REPOSITORY_FAILED: ${body.message}`
|
|
2367
2475
|
);
|
|
2368
2476
|
this.body = body;
|
|
2369
|
-
this.name = "
|
|
2477
|
+
this.name = "DeleteRepositoryFailedError";
|
|
2370
2478
|
}
|
|
2371
|
-
static code = "
|
|
2372
|
-
static statusCode =
|
|
2373
|
-
static description = `Failed to delete
|
|
2479
|
+
static code = "DELETE_REPOSITORY_FAILED";
|
|
2480
|
+
static statusCode = 500;
|
|
2481
|
+
static description = `Failed to delete repository: {message}`;
|
|
2374
2482
|
}
|
|
2375
|
-
class
|
|
2483
|
+
class CreateRepositoryFailedError extends Error {
|
|
2376
2484
|
constructor(body) {
|
|
2377
2485
|
super(
|
|
2378
|
-
`
|
|
2486
|
+
`CREATE_REPOSITORY_FAILED: ${body.message}`
|
|
2379
2487
|
);
|
|
2380
2488
|
this.body = body;
|
|
2381
|
-
this.name = "
|
|
2489
|
+
this.name = "CreateRepositoryFailedError";
|
|
2382
2490
|
}
|
|
2383
|
-
static code = "
|
|
2384
|
-
static statusCode =
|
|
2385
|
-
static description = `
|
|
2491
|
+
static code = "CREATE_REPOSITORY_FAILED";
|
|
2492
|
+
static statusCode = 500;
|
|
2493
|
+
static description = `Failed to create repository: {message}`;
|
|
2386
2494
|
}
|
|
2387
|
-
class
|
|
2495
|
+
class SerializationErrorError extends Error {
|
|
2388
2496
|
constructor(body) {
|
|
2389
2497
|
super(
|
|
2390
|
-
`
|
|
2498
|
+
`SERIALIZATION_ERROR: ${body.message}`
|
|
2391
2499
|
);
|
|
2392
2500
|
this.body = body;
|
|
2393
|
-
this.name = "
|
|
2501
|
+
this.name = "SerializationErrorError";
|
|
2394
2502
|
}
|
|
2395
|
-
static code = "
|
|
2503
|
+
static code = "SERIALIZATION_ERROR";
|
|
2396
2504
|
static statusCode = 400;
|
|
2397
|
-
static description = `Failed to
|
|
2505
|
+
static description = `Failed to serialize request: {message}`;
|
|
2398
2506
|
}
|
|
2399
|
-
class
|
|
2507
|
+
class GitInvalidRequestError extends Error {
|
|
2400
2508
|
constructor(body) {
|
|
2401
2509
|
super(
|
|
2402
|
-
`
|
|
2510
|
+
`GIT_INVALID_REQUEST: ${body.message}`
|
|
2403
2511
|
);
|
|
2404
2512
|
this.body = body;
|
|
2405
|
-
this.name = "
|
|
2513
|
+
this.name = "GitInvalidRequestError";
|
|
2406
2514
|
}
|
|
2407
|
-
static code = "
|
|
2515
|
+
static code = "GIT_INVALID_REQUEST";
|
|
2408
2516
|
static statusCode = 400;
|
|
2409
|
-
static description = `Invalid
|
|
2410
|
-
}
|
|
2411
|
-
class CloudstateInternalErrorError extends Error {
|
|
2412
|
-
constructor(body) {
|
|
2413
|
-
super(
|
|
2414
|
-
`CLOUDSTATE_INTERNAL_ERROR: ${body.message}`
|
|
2415
|
-
);
|
|
2416
|
-
this.body = body;
|
|
2417
|
-
this.name = "CloudstateInternalErrorError";
|
|
2418
|
-
}
|
|
2419
|
-
static code = "CLOUDSTATE_INTERNAL_ERROR";
|
|
2420
|
-
static statusCode = 500;
|
|
2421
|
-
static description = `Internal error: {message}`;
|
|
2422
|
-
}
|
|
2423
|
-
class CloudstateDatabaseErrorError extends Error {
|
|
2424
|
-
constructor(body) {
|
|
2425
|
-
super(
|
|
2426
|
-
`CLOUDSTATE_DATABASE_ERROR: ${body.message}`
|
|
2427
|
-
);
|
|
2428
|
-
this.body = body;
|
|
2429
|
-
this.name = "CloudstateDatabaseErrorError";
|
|
2430
|
-
}
|
|
2431
|
-
static code = "CLOUDSTATE_DATABASE_ERROR";
|
|
2432
|
-
static statusCode = 500;
|
|
2433
|
-
static description = `Database operation failed: {message}`;
|
|
2434
|
-
}
|
|
2435
|
-
class CloudstateAccessDeniedError extends Error {
|
|
2436
|
-
constructor(body) {
|
|
2437
|
-
super(
|
|
2438
|
-
`CLOUDSTATE_ACCESS_DENIED: ${body.message}`
|
|
2439
|
-
);
|
|
2440
|
-
this.body = body;
|
|
2441
|
-
this.name = "CloudstateAccessDeniedError";
|
|
2442
|
-
}
|
|
2443
|
-
static code = "CLOUDSTATE_ACCESS_DENIED";
|
|
2444
|
-
static statusCode = 403;
|
|
2445
|
-
static description = `Access denied to project: {project_id}`;
|
|
2517
|
+
static description = `Invalid request: {message}`;
|
|
2446
2518
|
}
|
|
2447
|
-
class
|
|
2519
|
+
class RepositoryNotFoundError extends Error {
|
|
2448
2520
|
constructor(body) {
|
|
2449
2521
|
super(
|
|
2450
|
-
`
|
|
2522
|
+
`REPOSITORY_NOT_FOUND: ${body.message}`
|
|
2451
2523
|
);
|
|
2452
2524
|
this.body = body;
|
|
2453
|
-
this.name = "
|
|
2454
|
-
}
|
|
2455
|
-
static code = "
|
|
2456
|
-
static statusCode =
|
|
2457
|
-
static description = `
|
|
2525
|
+
this.name = "RepositoryNotFoundError";
|
|
2526
|
+
}
|
|
2527
|
+
static code = "REPOSITORY_NOT_FOUND";
|
|
2528
|
+
static statusCode = 404;
|
|
2529
|
+
static description = `Repository not found: {repo_id}`;
|
|
2458
2530
|
}
|
|
2459
|
-
class
|
|
2531
|
+
class DomainOwnershipVerificationFailedError extends Error {
|
|
2460
2532
|
constructor(body) {
|
|
2461
2533
|
super(
|
|
2462
|
-
`
|
|
2534
|
+
`DOMAIN_OWNERSHIP_VERIFICATION_FAILED: ${body.message}`
|
|
2463
2535
|
);
|
|
2464
2536
|
this.body = body;
|
|
2465
|
-
this.name = "
|
|
2537
|
+
this.name = "DomainOwnershipVerificationFailedError";
|
|
2466
2538
|
}
|
|
2467
|
-
static code = "
|
|
2468
|
-
static statusCode =
|
|
2469
|
-
static description = `
|
|
2539
|
+
static code = "DOMAIN_OWNERSHIP_VERIFICATION_FAILED";
|
|
2540
|
+
static statusCode = 403;
|
|
2541
|
+
static description = `Domain ownership verification failed`;
|
|
2470
2542
|
}
|
|
2471
|
-
class
|
|
2543
|
+
class ErrorDeletingRecordError extends Error {
|
|
2472
2544
|
constructor(body) {
|
|
2473
2545
|
super(
|
|
2474
|
-
`
|
|
2546
|
+
`ERROR_DELETING_RECORD: ${body.message}`
|
|
2475
2547
|
);
|
|
2476
2548
|
this.body = body;
|
|
2477
|
-
this.name = "
|
|
2549
|
+
this.name = "ErrorDeletingRecordError";
|
|
2478
2550
|
}
|
|
2479
|
-
static code = "
|
|
2551
|
+
static code = "ERROR_DELETING_RECORD";
|
|
2480
2552
|
static statusCode = 500;
|
|
2481
|
-
static description = `
|
|
2553
|
+
static description = `Error deleting DNS record for {domain}/{name}: {message}`;
|
|
2482
2554
|
}
|
|
2483
|
-
class
|
|
2555
|
+
class RecordOwnershipErrorError extends Error {
|
|
2484
2556
|
constructor(body) {
|
|
2485
2557
|
super(
|
|
2486
|
-
`
|
|
2558
|
+
`RECORD_OWNERSHIP_ERROR: ${body.message}`
|
|
2487
2559
|
);
|
|
2488
2560
|
this.body = body;
|
|
2489
|
-
this.name = "
|
|
2561
|
+
this.name = "RecordOwnershipErrorError";
|
|
2490
2562
|
}
|
|
2491
|
-
static code = "
|
|
2492
|
-
static statusCode =
|
|
2493
|
-
static description = `
|
|
2563
|
+
static code = "RECORD_OWNERSHIP_ERROR";
|
|
2564
|
+
static statusCode = 403;
|
|
2565
|
+
static description = `Account {account_id} does not own record {record_id}`;
|
|
2494
2566
|
}
|
|
2495
|
-
class
|
|
2567
|
+
class ErrorCreatingRecordError extends Error {
|
|
2496
2568
|
constructor(body) {
|
|
2497
2569
|
super(
|
|
2498
|
-
`
|
|
2570
|
+
`ERROR_CREATING_RECORD: ${body.message}`
|
|
2499
2571
|
);
|
|
2500
2572
|
this.body = body;
|
|
2501
|
-
this.name = "
|
|
2573
|
+
this.name = "ErrorCreatingRecordError";
|
|
2502
2574
|
}
|
|
2503
|
-
static code = "
|
|
2504
|
-
static statusCode =
|
|
2505
|
-
static description = `
|
|
2575
|
+
static code = "ERROR_CREATING_RECORD";
|
|
2576
|
+
static statusCode = 500;
|
|
2577
|
+
static description = `Error creating DNS record: {message}`;
|
|
2506
2578
|
}
|
|
2507
|
-
class
|
|
2579
|
+
class DomainOwnershipErrorError extends Error {
|
|
2508
2580
|
constructor(body) {
|
|
2509
2581
|
super(
|
|
2510
|
-
`
|
|
2582
|
+
`DOMAIN_OWNERSHIP_ERROR: ${body.message}`
|
|
2511
2583
|
);
|
|
2512
2584
|
this.body = body;
|
|
2513
|
-
this.name = "
|
|
2585
|
+
this.name = "DomainOwnershipErrorError";
|
|
2514
2586
|
}
|
|
2515
|
-
static code = "
|
|
2516
|
-
static statusCode =
|
|
2517
|
-
static description = `
|
|
2587
|
+
static code = "DOMAIN_OWNERSHIP_ERROR";
|
|
2588
|
+
static statusCode = 403;
|
|
2589
|
+
static description = `Account {account_id} does not own domain {domain}`;
|
|
2518
2590
|
}
|
|
2519
|
-
class
|
|
2591
|
+
class UnauthorizedErrorError extends Error {
|
|
2520
2592
|
constructor(body) {
|
|
2521
2593
|
super(
|
|
2522
|
-
`
|
|
2594
|
+
`UNAUTHORIZED_ERROR: ${body.message}`
|
|
2523
2595
|
);
|
|
2524
2596
|
this.body = body;
|
|
2525
|
-
this.name = "
|
|
2597
|
+
this.name = "UnauthorizedErrorError";
|
|
2526
2598
|
}
|
|
2527
|
-
static code = "
|
|
2528
|
-
static statusCode =
|
|
2529
|
-
static description = `
|
|
2599
|
+
static code = "UNAUTHORIZED_ERROR";
|
|
2600
|
+
static statusCode = 401;
|
|
2601
|
+
static description = `Unauthorized request to {route}`;
|
|
2530
2602
|
}
|
|
2531
|
-
class
|
|
2603
|
+
class BranchNameEmptyError extends Error {
|
|
2532
2604
|
constructor(body) {
|
|
2533
2605
|
super(
|
|
2534
|
-
`
|
|
2606
|
+
`BRANCH_NAME_EMPTY: ${body.message}`
|
|
2535
2607
|
);
|
|
2536
2608
|
this.body = body;
|
|
2537
|
-
this.name = "
|
|
2609
|
+
this.name = "BranchNameEmptyError";
|
|
2538
2610
|
}
|
|
2539
|
-
static code = "
|
|
2540
|
-
static statusCode =
|
|
2541
|
-
static description = `
|
|
2611
|
+
static code = "BRANCH_NAME_EMPTY";
|
|
2612
|
+
static statusCode = 400;
|
|
2613
|
+
static description = `Branch name cannot be empty`;
|
|
2542
2614
|
}
|
|
2543
2615
|
class ServerDeploymentFailedError extends Error {
|
|
2544
2616
|
constructor(body) {
|
|
@@ -2720,497 +2792,401 @@ class InternalResizeVmNotFoundError extends Error {
|
|
|
2720
2792
|
static statusCode = 404;
|
|
2721
2793
|
static description = `VM not found`;
|
|
2722
2794
|
}
|
|
2723
|
-
class
|
|
2724
|
-
constructor(body) {
|
|
2725
|
-
super(
|
|
2726
|
-
`DOMAIN_OWNERSHIP_VERIFICATION_FAILED: ${body.message}`
|
|
2727
|
-
);
|
|
2728
|
-
this.body = body;
|
|
2729
|
-
this.name = "DomainOwnershipVerificationFailedError";
|
|
2730
|
-
}
|
|
2731
|
-
static code = "DOMAIN_OWNERSHIP_VERIFICATION_FAILED";
|
|
2732
|
-
static statusCode = 403;
|
|
2733
|
-
static description = `Domain ownership verification failed`;
|
|
2734
|
-
}
|
|
2735
|
-
class ErrorDeletingRecordError extends Error {
|
|
2736
|
-
constructor(body) {
|
|
2737
|
-
super(
|
|
2738
|
-
`ERROR_DELETING_RECORD: ${body.message}`
|
|
2739
|
-
);
|
|
2740
|
-
this.body = body;
|
|
2741
|
-
this.name = "ErrorDeletingRecordError";
|
|
2742
|
-
}
|
|
2743
|
-
static code = "ERROR_DELETING_RECORD";
|
|
2744
|
-
static statusCode = 500;
|
|
2745
|
-
static description = `Error deleting DNS record for {domain}/{name}: {message}`;
|
|
2746
|
-
}
|
|
2747
|
-
class RecordOwnershipErrorError extends Error {
|
|
2748
|
-
constructor(body) {
|
|
2749
|
-
super(
|
|
2750
|
-
`RECORD_OWNERSHIP_ERROR: ${body.message}`
|
|
2751
|
-
);
|
|
2752
|
-
this.body = body;
|
|
2753
|
-
this.name = "RecordOwnershipErrorError";
|
|
2754
|
-
}
|
|
2755
|
-
static code = "RECORD_OWNERSHIP_ERROR";
|
|
2756
|
-
static statusCode = 403;
|
|
2757
|
-
static description = `Account {account_id} does not own record {record_id}`;
|
|
2758
|
-
}
|
|
2759
|
-
class ErrorCreatingRecordError extends Error {
|
|
2760
|
-
constructor(body) {
|
|
2761
|
-
super(
|
|
2762
|
-
`ERROR_CREATING_RECORD: ${body.message}`
|
|
2763
|
-
);
|
|
2764
|
-
this.body = body;
|
|
2765
|
-
this.name = "ErrorCreatingRecordError";
|
|
2766
|
-
}
|
|
2767
|
-
static code = "ERROR_CREATING_RECORD";
|
|
2768
|
-
static statusCode = 500;
|
|
2769
|
-
static description = `Error creating DNS record: {message}`;
|
|
2770
|
-
}
|
|
2771
|
-
class DomainOwnershipErrorError extends Error {
|
|
2772
|
-
constructor(body) {
|
|
2773
|
-
super(
|
|
2774
|
-
`DOMAIN_OWNERSHIP_ERROR: ${body.message}`
|
|
2775
|
-
);
|
|
2776
|
-
this.body = body;
|
|
2777
|
-
this.name = "DomainOwnershipErrorError";
|
|
2778
|
-
}
|
|
2779
|
-
static code = "DOMAIN_OWNERSHIP_ERROR";
|
|
2780
|
-
static statusCode = 403;
|
|
2781
|
-
static description = `Account {account_id} does not own domain {domain}`;
|
|
2782
|
-
}
|
|
2783
|
-
class GitRepoLimitExceededError extends Error {
|
|
2784
|
-
constructor(body) {
|
|
2785
|
-
super(
|
|
2786
|
-
`GIT_REPO_LIMIT_EXCEEDED: ${body.message}`
|
|
2787
|
-
);
|
|
2788
|
-
this.body = body;
|
|
2789
|
-
this.name = "GitRepoLimitExceededError";
|
|
2790
|
-
}
|
|
2791
|
-
static code = "GIT_REPO_LIMIT_EXCEEDED";
|
|
2792
|
-
static statusCode = 403;
|
|
2793
|
-
static description = `Repository limit exceeded: your plan allows {limit} repositories, you currently have {current}`;
|
|
2794
|
-
}
|
|
2795
|
-
class RootfsSizeTooLargeError extends Error {
|
|
2796
|
-
constructor(body) {
|
|
2797
|
-
super(
|
|
2798
|
-
`ROOTFS_SIZE_TOO_LARGE: ${body.message}`
|
|
2799
|
-
);
|
|
2800
|
-
this.body = body;
|
|
2801
|
-
this.name = "RootfsSizeTooLargeError";
|
|
2802
|
-
}
|
|
2803
|
-
static code = "ROOTFS_SIZE_TOO_LARGE";
|
|
2804
|
-
static statusCode = 400;
|
|
2805
|
-
static description = `rootfsSizeGb {got_gb} is too large`;
|
|
2806
|
-
}
|
|
2807
|
-
class MemSizeTooLargeError extends Error {
|
|
2808
|
-
constructor(body) {
|
|
2809
|
-
super(
|
|
2810
|
-
`MEM_SIZE_TOO_LARGE: ${body.message}`
|
|
2811
|
-
);
|
|
2812
|
-
this.body = body;
|
|
2813
|
-
this.name = "MemSizeTooLargeError";
|
|
2814
|
-
}
|
|
2815
|
-
static code = "MEM_SIZE_TOO_LARGE";
|
|
2816
|
-
static statusCode = 400;
|
|
2817
|
-
static description = `memSizeGb {got_gb} is too large`;
|
|
2818
|
-
}
|
|
2819
|
-
class RootfsOverPlanLimitError extends Error {
|
|
2795
|
+
class ExecuteLimitExceededError extends Error {
|
|
2820
2796
|
constructor(body) {
|
|
2821
2797
|
super(
|
|
2822
|
-
`
|
|
2798
|
+
`EXECUTE_LIMIT_EXCEEDED: ${body.message}`
|
|
2823
2799
|
);
|
|
2824
2800
|
this.body = body;
|
|
2825
|
-
this.name = "
|
|
2801
|
+
this.name = "ExecuteLimitExceededError";
|
|
2826
2802
|
}
|
|
2827
|
-
static code = "
|
|
2803
|
+
static code = "EXECUTE_LIMIT_EXCEEDED";
|
|
2828
2804
|
static statusCode = 403;
|
|
2829
|
-
static description = `
|
|
2805
|
+
static description = `Execute runs limit exceeded: your plan allows {limit} runs per month, you have used {current}`;
|
|
2830
2806
|
}
|
|
2831
|
-
class
|
|
2807
|
+
class DomainOwnershipNotVerifiedError extends Error {
|
|
2832
2808
|
constructor(body) {
|
|
2833
2809
|
super(
|
|
2834
|
-
`
|
|
2810
|
+
`DOMAIN_OWNERSHIP_NOT_VERIFIED: ${body.message}`
|
|
2835
2811
|
);
|
|
2836
2812
|
this.body = body;
|
|
2837
|
-
this.name = "
|
|
2813
|
+
this.name = "DomainOwnershipNotVerifiedError";
|
|
2838
2814
|
}
|
|
2839
|
-
static code = "
|
|
2840
|
-
static statusCode =
|
|
2841
|
-
static description = `
|
|
2815
|
+
static code = "DOMAIN_OWNERSHIP_NOT_VERIFIED";
|
|
2816
|
+
static statusCode = 401;
|
|
2817
|
+
static description = `You have not verified ownership of domain: {domain}`;
|
|
2842
2818
|
}
|
|
2843
|
-
class
|
|
2819
|
+
class VmAccessDeniedForMappingError extends Error {
|
|
2844
2820
|
constructor(body) {
|
|
2845
2821
|
super(
|
|
2846
|
-
`
|
|
2822
|
+
`VM_ACCESS_DENIED_FOR_MAPPING: ${body.message}`
|
|
2847
2823
|
);
|
|
2848
2824
|
this.body = body;
|
|
2849
|
-
this.name = "
|
|
2825
|
+
this.name = "VmAccessDeniedForMappingError";
|
|
2850
2826
|
}
|
|
2851
|
-
static code = "
|
|
2852
|
-
static statusCode =
|
|
2853
|
-
static description = `
|
|
2827
|
+
static code = "VM_ACCESS_DENIED_FOR_MAPPING";
|
|
2828
|
+
static statusCode = 401;
|
|
2829
|
+
static description = `You do not have permission to map to this VM: {vm_id}`;
|
|
2854
2830
|
}
|
|
2855
|
-
class
|
|
2831
|
+
class DeploymentAccessDeniedError extends Error {
|
|
2856
2832
|
constructor(body) {
|
|
2857
2833
|
super(
|
|
2858
|
-
`
|
|
2834
|
+
`DEPLOYMENT_ACCESS_DENIED: ${body.message}`
|
|
2859
2835
|
);
|
|
2860
2836
|
this.body = body;
|
|
2861
|
-
this.name = "
|
|
2837
|
+
this.name = "DeploymentAccessDeniedError";
|
|
2862
2838
|
}
|
|
2863
|
-
static code = "
|
|
2864
|
-
static statusCode =
|
|
2865
|
-
static description = `
|
|
2839
|
+
static code = "DEPLOYMENT_ACCESS_DENIED";
|
|
2840
|
+
static statusCode = 401;
|
|
2841
|
+
static description = `You do not have permission to map to this deployment: {deployment_id}`;
|
|
2866
2842
|
}
|
|
2867
|
-
class
|
|
2843
|
+
class FailedToProvisionCertificateForMappingError extends Error {
|
|
2868
2844
|
constructor(body) {
|
|
2869
2845
|
super(
|
|
2870
|
-
`
|
|
2846
|
+
`FAILED_TO_PROVISION_CERTIFICATE_FOR_MAPPING: ${body.message}`
|
|
2871
2847
|
);
|
|
2872
2848
|
this.body = body;
|
|
2873
|
-
this.name = "
|
|
2849
|
+
this.name = "FailedToProvisionCertificateForMappingError";
|
|
2874
2850
|
}
|
|
2875
|
-
static code = "
|
|
2876
|
-
static statusCode =
|
|
2877
|
-
static description = `
|
|
2851
|
+
static code = "FAILED_TO_PROVISION_CERTIFICATE_FOR_MAPPING";
|
|
2852
|
+
static statusCode = 422;
|
|
2853
|
+
static description = `Failed to provision certificate for mapping: {message}`;
|
|
2878
2854
|
}
|
|
2879
|
-
class
|
|
2855
|
+
class FailedInsertDomainMappingError extends Error {
|
|
2880
2856
|
constructor(body) {
|
|
2881
2857
|
super(
|
|
2882
|
-
`
|
|
2858
|
+
`FAILED_INSERT_DOMAIN_MAPPING: ${body.message}`
|
|
2883
2859
|
);
|
|
2884
2860
|
this.body = body;
|
|
2885
|
-
this.name = "
|
|
2861
|
+
this.name = "FailedInsertDomainMappingError";
|
|
2886
2862
|
}
|
|
2887
|
-
static code = "
|
|
2888
|
-
static statusCode =
|
|
2889
|
-
static description = `
|
|
2863
|
+
static code = "FAILED_INSERT_DOMAIN_MAPPING";
|
|
2864
|
+
static statusCode = 500;
|
|
2865
|
+
static description = `Failed to insert domain mapping: {message}`;
|
|
2890
2866
|
}
|
|
2891
|
-
class
|
|
2867
|
+
class DomainAlreadyExistsError extends Error {
|
|
2892
2868
|
constructor(body) {
|
|
2893
2869
|
super(
|
|
2894
|
-
`
|
|
2870
|
+
`DOMAIN_ALREADY_EXISTS: ${body.message}`
|
|
2895
2871
|
);
|
|
2896
2872
|
this.body = body;
|
|
2897
|
-
this.name = "
|
|
2873
|
+
this.name = "DomainAlreadyExistsError";
|
|
2898
2874
|
}
|
|
2899
|
-
static code = "
|
|
2900
|
-
static statusCode =
|
|
2901
|
-
static description = `
|
|
2875
|
+
static code = "DOMAIN_ALREADY_EXISTS";
|
|
2876
|
+
static statusCode = 400;
|
|
2877
|
+
static description = `Domain already exists: {domain}`;
|
|
2902
2878
|
}
|
|
2903
|
-
class
|
|
2879
|
+
class FailedToInsertOwnershipError extends Error {
|
|
2904
2880
|
constructor(body) {
|
|
2905
2881
|
super(
|
|
2906
|
-
`
|
|
2882
|
+
`FAILED_TO_INSERT_OWNERSHIP: ${body.message}`
|
|
2907
2883
|
);
|
|
2908
2884
|
this.body = body;
|
|
2909
|
-
this.name = "
|
|
2885
|
+
this.name = "FailedToInsertOwnershipError";
|
|
2910
2886
|
}
|
|
2911
|
-
static code = "
|
|
2912
|
-
static statusCode =
|
|
2913
|
-
static description = `
|
|
2887
|
+
static code = "FAILED_TO_INSERT_OWNERSHIP";
|
|
2888
|
+
static statusCode = 500;
|
|
2889
|
+
static description = `Failed to insert domain ownership: {message}`;
|
|
2914
2890
|
}
|
|
2915
|
-
class
|
|
2891
|
+
class FailedRemoveDomainMappingError extends Error {
|
|
2916
2892
|
constructor(body) {
|
|
2917
2893
|
super(
|
|
2918
|
-
`
|
|
2894
|
+
`FAILED_REMOVE_DOMAIN_MAPPING: ${body.message}`
|
|
2919
2895
|
);
|
|
2920
2896
|
this.body = body;
|
|
2921
|
-
this.name = "
|
|
2897
|
+
this.name = "FailedRemoveDomainMappingError";
|
|
2922
2898
|
}
|
|
2923
|
-
static code = "
|
|
2899
|
+
static code = "FAILED_REMOVE_DOMAIN_MAPPING";
|
|
2924
2900
|
static statusCode = 500;
|
|
2925
|
-
static description = `
|
|
2901
|
+
static description = `Failed to remove domain mapping: {message}`;
|
|
2926
2902
|
}
|
|
2927
|
-
class
|
|
2903
|
+
class FailedPermissionsCheckError extends Error {
|
|
2928
2904
|
constructor(body) {
|
|
2929
2905
|
super(
|
|
2930
|
-
`
|
|
2906
|
+
`FAILED_PERMISSIONS_CHECK: ${body.message}`
|
|
2931
2907
|
);
|
|
2932
2908
|
this.body = body;
|
|
2933
|
-
this.name = "
|
|
2909
|
+
this.name = "FailedPermissionsCheckError";
|
|
2934
2910
|
}
|
|
2935
|
-
static code = "
|
|
2936
|
-
static statusCode =
|
|
2937
|
-
static description = `
|
|
2911
|
+
static code = "FAILED_PERMISSIONS_CHECK";
|
|
2912
|
+
static statusCode = 401;
|
|
2913
|
+
static description = `You do not have permission to delete the domain mapping for: {domain}`;
|
|
2938
2914
|
}
|
|
2939
|
-
class
|
|
2915
|
+
class FailedToCheckDomainMappingPermissionsError extends Error {
|
|
2940
2916
|
constructor(body) {
|
|
2941
2917
|
super(
|
|
2942
|
-
`
|
|
2918
|
+
`FAILED_TO_CHECK_DOMAIN_MAPPING_PERMISSIONS: ${body.message}`
|
|
2943
2919
|
);
|
|
2944
2920
|
this.body = body;
|
|
2945
|
-
this.name = "
|
|
2921
|
+
this.name = "FailedToCheckDomainMappingPermissionsError";
|
|
2946
2922
|
}
|
|
2947
|
-
static code = "
|
|
2948
|
-
static statusCode =
|
|
2949
|
-
static description = `Failed to
|
|
2923
|
+
static code = "FAILED_TO_CHECK_DOMAIN_MAPPING_PERMISSIONS";
|
|
2924
|
+
static statusCode = 502;
|
|
2925
|
+
static description = `Failed to check permissions: {message}`;
|
|
2950
2926
|
}
|
|
2951
|
-
class
|
|
2927
|
+
class FailedToPreRegisterError extends Error {
|
|
2952
2928
|
constructor(body) {
|
|
2953
2929
|
super(
|
|
2954
|
-
`
|
|
2930
|
+
`FAILED_TO_PRE_REGISTER: ${body.message}`
|
|
2955
2931
|
);
|
|
2956
2932
|
this.body = body;
|
|
2957
|
-
this.name = "
|
|
2933
|
+
this.name = "FailedToPreRegisterError";
|
|
2958
2934
|
}
|
|
2959
|
-
static code = "
|
|
2935
|
+
static code = "FAILED_TO_PRE_REGISTER";
|
|
2960
2936
|
static statusCode = 500;
|
|
2961
|
-
static description = `Failed to
|
|
2937
|
+
static description = `Failed to pre-register fork ownership for vm {vm_id}: {details}`;
|
|
2962
2938
|
}
|
|
2963
|
-
class
|
|
2939
|
+
class AccessDeniedError extends Error {
|
|
2964
2940
|
constructor(body) {
|
|
2965
2941
|
super(
|
|
2966
|
-
`
|
|
2942
|
+
`ACCESS_DENIED: ${body.message}`
|
|
2967
2943
|
);
|
|
2968
2944
|
this.body = body;
|
|
2969
|
-
this.name = "
|
|
2945
|
+
this.name = "AccessDeniedError";
|
|
2970
2946
|
}
|
|
2971
|
-
static code = "
|
|
2972
|
-
static statusCode =
|
|
2973
|
-
static description = `
|
|
2947
|
+
static code = "ACCESS_DENIED";
|
|
2948
|
+
static statusCode = 403;
|
|
2949
|
+
static description = `VM access denied`;
|
|
2974
2950
|
}
|
|
2975
|
-
class
|
|
2951
|
+
class PermissionAlreadyExistsError extends Error {
|
|
2976
2952
|
constructor(body) {
|
|
2977
2953
|
super(
|
|
2978
|
-
`
|
|
2954
|
+
`PERMISSION_ALREADY_EXISTS: ${body.message}`
|
|
2979
2955
|
);
|
|
2980
2956
|
this.body = body;
|
|
2981
|
-
this.name = "
|
|
2957
|
+
this.name = "PermissionAlreadyExistsError";
|
|
2982
2958
|
}
|
|
2983
|
-
static code = "
|
|
2984
|
-
static statusCode =
|
|
2985
|
-
static description = `
|
|
2959
|
+
static code = "PERMISSION_ALREADY_EXISTS";
|
|
2960
|
+
static statusCode = 409;
|
|
2961
|
+
static description = `Permission already exists`;
|
|
2986
2962
|
}
|
|
2987
|
-
class
|
|
2963
|
+
class ListTokensFailedError extends Error {
|
|
2988
2964
|
constructor(body) {
|
|
2989
2965
|
super(
|
|
2990
|
-
`
|
|
2966
|
+
`LIST_TOKENS_FAILED: ${body.message}`
|
|
2991
2967
|
);
|
|
2992
2968
|
this.body = body;
|
|
2993
|
-
this.name = "
|
|
2969
|
+
this.name = "ListTokensFailedError";
|
|
2994
2970
|
}
|
|
2995
|
-
static code = "
|
|
2971
|
+
static code = "LIST_TOKENS_FAILED";
|
|
2996
2972
|
static statusCode = 500;
|
|
2997
|
-
static description = `Failed to
|
|
2973
|
+
static description = `Failed to list tokens: {message}`;
|
|
2998
2974
|
}
|
|
2999
|
-
class
|
|
2975
|
+
class RevokeTokenFailedError extends Error {
|
|
3000
2976
|
constructor(body) {
|
|
3001
2977
|
super(
|
|
3002
|
-
`
|
|
2978
|
+
`REVOKE_TOKEN_FAILED: ${body.message}`
|
|
3003
2979
|
);
|
|
3004
2980
|
this.body = body;
|
|
3005
|
-
this.name = "
|
|
2981
|
+
this.name = "RevokeTokenFailedError";
|
|
3006
2982
|
}
|
|
3007
|
-
static code = "
|
|
2983
|
+
static code = "REVOKE_TOKEN_FAILED";
|
|
3008
2984
|
static statusCode = 500;
|
|
3009
|
-
static description = `Failed to
|
|
2985
|
+
static description = `Failed to revoke token: {message}`;
|
|
3010
2986
|
}
|
|
3011
|
-
class
|
|
2987
|
+
class CreateTokenFailedError extends Error {
|
|
3012
2988
|
constructor(body) {
|
|
3013
2989
|
super(
|
|
3014
|
-
`
|
|
2990
|
+
`CREATE_TOKEN_FAILED: ${body.message}`
|
|
3015
2991
|
);
|
|
3016
2992
|
this.body = body;
|
|
3017
|
-
this.name = "
|
|
2993
|
+
this.name = "CreateTokenFailedError";
|
|
3018
2994
|
}
|
|
3019
|
-
static code = "
|
|
2995
|
+
static code = "CREATE_TOKEN_FAILED";
|
|
3020
2996
|
static statusCode = 500;
|
|
3021
|
-
static description = `Failed to
|
|
2997
|
+
static description = `Failed to create token: {message}`;
|
|
3022
2998
|
}
|
|
3023
|
-
class
|
|
2999
|
+
class ListPermissionsFailedError extends Error {
|
|
3024
3000
|
constructor(body) {
|
|
3025
3001
|
super(
|
|
3026
|
-
`
|
|
3002
|
+
`LIST_PERMISSIONS_FAILED: ${body.message}`
|
|
3027
3003
|
);
|
|
3028
3004
|
this.body = body;
|
|
3029
|
-
this.name = "
|
|
3005
|
+
this.name = "ListPermissionsFailedError";
|
|
3030
3006
|
}
|
|
3031
|
-
static code = "
|
|
3007
|
+
static code = "LIST_PERMISSIONS_FAILED";
|
|
3032
3008
|
static statusCode = 500;
|
|
3033
|
-
static description = `Failed to
|
|
3009
|
+
static description = `Failed to list permissions: {message}`;
|
|
3034
3010
|
}
|
|
3035
|
-
class
|
|
3011
|
+
class GetPermissionFailedError extends Error {
|
|
3036
3012
|
constructor(body) {
|
|
3037
3013
|
super(
|
|
3038
|
-
`
|
|
3014
|
+
`GET_PERMISSION_FAILED: ${body.message}`
|
|
3039
3015
|
);
|
|
3040
3016
|
this.body = body;
|
|
3041
|
-
this.name = "
|
|
3017
|
+
this.name = "GetPermissionFailedError";
|
|
3042
3018
|
}
|
|
3043
|
-
static code = "
|
|
3019
|
+
static code = "GET_PERMISSION_FAILED";
|
|
3044
3020
|
static statusCode = 500;
|
|
3045
|
-
static description = `Failed to get
|
|
3021
|
+
static description = `Failed to get permission: {message}`;
|
|
3046
3022
|
}
|
|
3047
|
-
class
|
|
3023
|
+
class UpdatePermissionFailedError extends Error {
|
|
3048
3024
|
constructor(body) {
|
|
3049
3025
|
super(
|
|
3050
|
-
`
|
|
3026
|
+
`UPDATE_PERMISSION_FAILED: ${body.message}`
|
|
3051
3027
|
);
|
|
3052
3028
|
this.body = body;
|
|
3053
|
-
this.name = "
|
|
3029
|
+
this.name = "UpdatePermissionFailedError";
|
|
3054
3030
|
}
|
|
3055
|
-
static code = "
|
|
3056
|
-
static statusCode =
|
|
3057
|
-
static description = `
|
|
3031
|
+
static code = "UPDATE_PERMISSION_FAILED";
|
|
3032
|
+
static statusCode = 500;
|
|
3033
|
+
static description = `Failed to update permission: {message}`;
|
|
3058
3034
|
}
|
|
3059
|
-
class
|
|
3035
|
+
class RevokePermissionFailedError extends Error {
|
|
3060
3036
|
constructor(body) {
|
|
3061
3037
|
super(
|
|
3062
|
-
`
|
|
3038
|
+
`REVOKE_PERMISSION_FAILED: ${body.message}`
|
|
3063
3039
|
);
|
|
3064
3040
|
this.body = body;
|
|
3065
|
-
this.name = "
|
|
3041
|
+
this.name = "RevokePermissionFailedError";
|
|
3066
3042
|
}
|
|
3067
|
-
static code = "
|
|
3043
|
+
static code = "REVOKE_PERMISSION_FAILED";
|
|
3068
3044
|
static statusCode = 500;
|
|
3069
|
-
static description = `Failed to
|
|
3045
|
+
static description = `Failed to revoke permission: {message}`;
|
|
3070
3046
|
}
|
|
3071
|
-
class
|
|
3047
|
+
class GrantPermissionFailedError extends Error {
|
|
3072
3048
|
constructor(body) {
|
|
3073
3049
|
super(
|
|
3074
|
-
`
|
|
3050
|
+
`GRANT_PERMISSION_FAILED: ${body.message}`
|
|
3075
3051
|
);
|
|
3076
3052
|
this.body = body;
|
|
3077
|
-
this.name = "
|
|
3053
|
+
this.name = "GrantPermissionFailedError";
|
|
3078
3054
|
}
|
|
3079
|
-
static code = "
|
|
3055
|
+
static code = "GRANT_PERMISSION_FAILED";
|
|
3080
3056
|
static statusCode = 500;
|
|
3081
|
-
static description = `
|
|
3057
|
+
static description = `Failed to grant permission: {message}`;
|
|
3082
3058
|
}
|
|
3083
|
-
class
|
|
3059
|
+
class ListIdentitiesFailedError extends Error {
|
|
3084
3060
|
constructor(body) {
|
|
3085
3061
|
super(
|
|
3086
|
-
`
|
|
3062
|
+
`LIST_IDENTITIES_FAILED: ${body.message}`
|
|
3087
3063
|
);
|
|
3088
3064
|
this.body = body;
|
|
3089
|
-
this.name = "
|
|
3065
|
+
this.name = "ListIdentitiesFailedError";
|
|
3090
3066
|
}
|
|
3091
|
-
static code = "
|
|
3067
|
+
static code = "LIST_IDENTITIES_FAILED";
|
|
3092
3068
|
static statusCode = 500;
|
|
3093
|
-
static description = `Failed to
|
|
3069
|
+
static description = `Failed to list identities: {message}`;
|
|
3094
3070
|
}
|
|
3095
|
-
class
|
|
3071
|
+
class DeleteIdentityFailedError extends Error {
|
|
3096
3072
|
constructor(body) {
|
|
3097
3073
|
super(
|
|
3098
|
-
`
|
|
3074
|
+
`DELETE_IDENTITY_FAILED: ${body.message}`
|
|
3099
3075
|
);
|
|
3100
3076
|
this.body = body;
|
|
3101
|
-
this.name = "
|
|
3077
|
+
this.name = "DeleteIdentityFailedError";
|
|
3102
3078
|
}
|
|
3103
|
-
static code = "
|
|
3104
|
-
static statusCode =
|
|
3105
|
-
static description = `
|
|
3079
|
+
static code = "DELETE_IDENTITY_FAILED";
|
|
3080
|
+
static statusCode = 500;
|
|
3081
|
+
static description = `Failed to delete identity: {message}`;
|
|
3106
3082
|
}
|
|
3107
|
-
class
|
|
3083
|
+
class CreateIdentityFailedError extends Error {
|
|
3108
3084
|
constructor(body) {
|
|
3109
3085
|
super(
|
|
3110
|
-
`
|
|
3086
|
+
`CREATE_IDENTITY_FAILED: ${body.message}`
|
|
3111
3087
|
);
|
|
3112
3088
|
this.body = body;
|
|
3113
|
-
this.name = "
|
|
3089
|
+
this.name = "CreateIdentityFailedError";
|
|
3114
3090
|
}
|
|
3115
|
-
static code = "
|
|
3091
|
+
static code = "CREATE_IDENTITY_FAILED";
|
|
3116
3092
|
static statusCode = 500;
|
|
3117
|
-
static description = `Failed to
|
|
3093
|
+
static description = `Failed to create identity: {message}`;
|
|
3118
3094
|
}
|
|
3119
|
-
class
|
|
3095
|
+
class VmPermissionNotFoundError extends Error {
|
|
3120
3096
|
constructor(body) {
|
|
3121
3097
|
super(
|
|
3122
|
-
`
|
|
3098
|
+
`VM_PERMISSION_NOT_FOUND: ${body.message}`
|
|
3123
3099
|
);
|
|
3124
3100
|
this.body = body;
|
|
3125
|
-
this.name = "
|
|
3101
|
+
this.name = "VmPermissionNotFoundError";
|
|
3126
3102
|
}
|
|
3127
|
-
static code = "
|
|
3128
|
-
static statusCode =
|
|
3129
|
-
static description = `
|
|
3103
|
+
static code = "VM_PERMISSION_NOT_FOUND";
|
|
3104
|
+
static statusCode = 404;
|
|
3105
|
+
static description = `VM permission not found`;
|
|
3130
3106
|
}
|
|
3131
|
-
class
|
|
3107
|
+
class PermissionNotFoundError extends Error {
|
|
3132
3108
|
constructor(body) {
|
|
3133
3109
|
super(
|
|
3134
|
-
`
|
|
3110
|
+
`PERMISSION_NOT_FOUND: ${body.message}`
|
|
3135
3111
|
);
|
|
3136
3112
|
this.body = body;
|
|
3137
|
-
this.name = "
|
|
3113
|
+
this.name = "PermissionNotFoundError";
|
|
3138
3114
|
}
|
|
3139
|
-
static code = "
|
|
3140
|
-
static statusCode =
|
|
3141
|
-
static description = `
|
|
3115
|
+
static code = "PERMISSION_NOT_FOUND";
|
|
3116
|
+
static statusCode = 404;
|
|
3117
|
+
static description = `Permission not found`;
|
|
3142
3118
|
}
|
|
3143
|
-
class
|
|
3119
|
+
class GitRepositoryAccessDeniedError extends Error {
|
|
3144
3120
|
constructor(body) {
|
|
3145
3121
|
super(
|
|
3146
|
-
`
|
|
3122
|
+
`GIT_REPOSITORY_ACCESS_DENIED: ${body.message}`
|
|
3147
3123
|
);
|
|
3148
3124
|
this.body = body;
|
|
3149
|
-
this.name = "
|
|
3125
|
+
this.name = "GitRepositoryAccessDeniedError";
|
|
3150
3126
|
}
|
|
3151
|
-
static code = "
|
|
3152
|
-
static statusCode =
|
|
3153
|
-
static description = `
|
|
3127
|
+
static code = "GIT_REPOSITORY_ACCESS_DENIED";
|
|
3128
|
+
static statusCode = 403;
|
|
3129
|
+
static description = `You are not allowed to access this repository`;
|
|
3154
3130
|
}
|
|
3155
|
-
class
|
|
3131
|
+
class GitRepositoryNotFoundError extends Error {
|
|
3156
3132
|
constructor(body) {
|
|
3157
3133
|
super(
|
|
3158
|
-
`
|
|
3134
|
+
`GIT_REPOSITORY_NOT_FOUND: ${body.message}`
|
|
3159
3135
|
);
|
|
3160
3136
|
this.body = body;
|
|
3161
|
-
this.name = "
|
|
3137
|
+
this.name = "GitRepositoryNotFoundError";
|
|
3162
3138
|
}
|
|
3163
|
-
static code = "
|
|
3164
|
-
static statusCode =
|
|
3165
|
-
static description = `
|
|
3139
|
+
static code = "GIT_REPOSITORY_NOT_FOUND";
|
|
3140
|
+
static statusCode = 404;
|
|
3141
|
+
static description = `Repository not found`;
|
|
3166
3142
|
}
|
|
3167
|
-
class
|
|
3143
|
+
class CannotDeleteManagedIdentityError extends Error {
|
|
3168
3144
|
constructor(body) {
|
|
3169
3145
|
super(
|
|
3170
|
-
`
|
|
3146
|
+
`CANNOT_DELETE_MANAGED_IDENTITY: ${body.message}`
|
|
3171
3147
|
);
|
|
3172
3148
|
this.body = body;
|
|
3173
|
-
this.name = "
|
|
3149
|
+
this.name = "CannotDeleteManagedIdentityError";
|
|
3174
3150
|
}
|
|
3175
|
-
static code = "
|
|
3176
|
-
static statusCode =
|
|
3177
|
-
static description = `
|
|
3151
|
+
static code = "CANNOT_DELETE_MANAGED_IDENTITY";
|
|
3152
|
+
static statusCode = 403;
|
|
3153
|
+
static description = `Cannot delete managed identities`;
|
|
3178
3154
|
}
|
|
3179
|
-
class
|
|
3155
|
+
class CannotModifyManagedIdentityError extends Error {
|
|
3180
3156
|
constructor(body) {
|
|
3181
3157
|
super(
|
|
3182
|
-
`
|
|
3158
|
+
`CANNOT_MODIFY_MANAGED_IDENTITY: ${body.message}`
|
|
3183
3159
|
);
|
|
3184
3160
|
this.body = body;
|
|
3185
|
-
this.name = "
|
|
3161
|
+
this.name = "CannotModifyManagedIdentityError";
|
|
3186
3162
|
}
|
|
3187
|
-
static code = "
|
|
3188
|
-
static statusCode =
|
|
3189
|
-
static description = `
|
|
3163
|
+
static code = "CANNOT_MODIFY_MANAGED_IDENTITY";
|
|
3164
|
+
static statusCode = 403;
|
|
3165
|
+
static description = `Cannot modify managed identities`;
|
|
3190
3166
|
}
|
|
3191
|
-
class
|
|
3167
|
+
class IdentityAccessDeniedError extends Error {
|
|
3192
3168
|
constructor(body) {
|
|
3193
3169
|
super(
|
|
3194
|
-
`
|
|
3170
|
+
`IDENTITY_ACCESS_DENIED: ${body.message}`
|
|
3195
3171
|
);
|
|
3196
3172
|
this.body = body;
|
|
3197
|
-
this.name = "
|
|
3173
|
+
this.name = "IdentityAccessDeniedError";
|
|
3198
3174
|
}
|
|
3199
|
-
static code = "
|
|
3200
|
-
static statusCode =
|
|
3201
|
-
static description = `
|
|
3175
|
+
static code = "IDENTITY_ACCESS_DENIED";
|
|
3176
|
+
static statusCode = 403;
|
|
3177
|
+
static description = `You are not allowed to access this identity`;
|
|
3202
3178
|
}
|
|
3203
|
-
class
|
|
3179
|
+
class IdentityNotFoundError extends Error {
|
|
3204
3180
|
constructor(body) {
|
|
3205
3181
|
super(
|
|
3206
|
-
`
|
|
3182
|
+
`IDENTITY_NOT_FOUND: ${body.message}`
|
|
3207
3183
|
);
|
|
3208
3184
|
this.body = body;
|
|
3209
|
-
this.name = "
|
|
3185
|
+
this.name = "IdentityNotFoundError";
|
|
3210
3186
|
}
|
|
3211
|
-
static code = "
|
|
3187
|
+
static code = "IDENTITY_NOT_FOUND";
|
|
3212
3188
|
static statusCode = 404;
|
|
3213
|
-
static description = `
|
|
3189
|
+
static description = `Identity not found`;
|
|
3214
3190
|
}
|
|
3215
3191
|
class ExecuteInternalErrorError extends Error {
|
|
3216
3192
|
constructor(body) {
|
|
@@ -3380,125 +3356,281 @@ class RunNotFoundError extends Error {
|
|
|
3380
3356
|
static statusCode = 404;
|
|
3381
3357
|
static description = `Execute run not found: {run_id}`;
|
|
3382
3358
|
}
|
|
3383
|
-
class
|
|
3359
|
+
class LimitExceededError extends Error {
|
|
3384
3360
|
constructor(body) {
|
|
3385
3361
|
super(
|
|
3386
|
-
`
|
|
3362
|
+
`LIMIT_EXCEEDED: ${body.message}`
|
|
3387
3363
|
);
|
|
3388
3364
|
this.body = body;
|
|
3389
|
-
this.name = "
|
|
3365
|
+
this.name = "LimitExceededError";
|
|
3390
3366
|
}
|
|
3391
|
-
static code = "
|
|
3392
|
-
static statusCode =
|
|
3393
|
-
static description = `
|
|
3367
|
+
static code = "LIMIT_EXCEEDED";
|
|
3368
|
+
static statusCode = 403;
|
|
3369
|
+
static description = `Managed domains limit exceeded: your plan allows {limit} verified domains, you have {current}`;
|
|
3394
3370
|
}
|
|
3395
|
-
class
|
|
3371
|
+
class FailedToProvisionCertificateError extends Error {
|
|
3396
3372
|
constructor(body) {
|
|
3397
3373
|
super(
|
|
3398
|
-
`
|
|
3374
|
+
`FAILED_TO_PROVISION_CERTIFICATE: ${body.message}`
|
|
3399
3375
|
);
|
|
3400
3376
|
this.body = body;
|
|
3401
|
-
this.name = "
|
|
3377
|
+
this.name = "FailedToProvisionCertificateError";
|
|
3402
3378
|
}
|
|
3403
|
-
static code = "
|
|
3404
|
-
static statusCode =
|
|
3405
|
-
static description = `
|
|
3379
|
+
static code = "FAILED_TO_PROVISION_CERTIFICATE";
|
|
3380
|
+
static statusCode = 422;
|
|
3381
|
+
static description = `Failed to provision certificate: {message}`;
|
|
3406
3382
|
}
|
|
3407
|
-
class
|
|
3383
|
+
class FailedToInsertDomainMappingError extends Error {
|
|
3408
3384
|
constructor(body) {
|
|
3409
3385
|
super(
|
|
3410
|
-
`
|
|
3386
|
+
`FAILED_TO_INSERT_DOMAIN_MAPPING: ${body.message}`
|
|
3411
3387
|
);
|
|
3412
3388
|
this.body = body;
|
|
3413
|
-
this.name = "
|
|
3389
|
+
this.name = "FailedToInsertDomainMappingError";
|
|
3414
3390
|
}
|
|
3415
|
-
static code = "
|
|
3391
|
+
static code = "FAILED_TO_INSERT_DOMAIN_MAPPING";
|
|
3392
|
+
static statusCode = 500;
|
|
3393
|
+
static description = `Failed to insert domain mapping: {message}`;
|
|
3394
|
+
}
|
|
3395
|
+
class PermissionDeniedError extends Error {
|
|
3396
|
+
constructor(body) {
|
|
3397
|
+
super(
|
|
3398
|
+
`PERMISSION_DENIED: ${body.message}`
|
|
3399
|
+
);
|
|
3400
|
+
this.body = body;
|
|
3401
|
+
this.name = "PermissionDeniedError";
|
|
3402
|
+
}
|
|
3403
|
+
static code = "PERMISSION_DENIED";
|
|
3416
3404
|
static statusCode = 401;
|
|
3417
|
-
static description = `
|
|
3405
|
+
static description = `Permission denied: {message}`;
|
|
3418
3406
|
}
|
|
3419
|
-
class
|
|
3407
|
+
class FailedToCheckPermissionsError extends Error {
|
|
3420
3408
|
constructor(body) {
|
|
3421
3409
|
super(
|
|
3422
|
-
`
|
|
3410
|
+
`FAILED_TO_CHECK_PERMISSIONS: ${body.message}`
|
|
3423
3411
|
);
|
|
3424
3412
|
this.body = body;
|
|
3425
|
-
this.name = "
|
|
3413
|
+
this.name = "FailedToCheckPermissionsError";
|
|
3426
3414
|
}
|
|
3427
|
-
static code = "
|
|
3428
|
-
static statusCode =
|
|
3429
|
-
static description = `Failed to
|
|
3415
|
+
static code = "FAILED_TO_CHECK_PERMISSIONS";
|
|
3416
|
+
static statusCode = 502;
|
|
3417
|
+
static description = `Failed to check permissions: {message}`;
|
|
3430
3418
|
}
|
|
3431
|
-
class
|
|
3419
|
+
class FailedToListDomainsError extends Error {
|
|
3432
3420
|
constructor(body) {
|
|
3433
3421
|
super(
|
|
3434
|
-
`
|
|
3422
|
+
`FAILED_TO_LIST_DOMAINS: ${body.message}`
|
|
3435
3423
|
);
|
|
3436
3424
|
this.body = body;
|
|
3437
|
-
this.name = "
|
|
3425
|
+
this.name = "FailedToListDomainsError";
|
|
3438
3426
|
}
|
|
3439
|
-
static code = "
|
|
3427
|
+
static code = "FAILED_TO_LIST_DOMAINS";
|
|
3440
3428
|
static statusCode = 500;
|
|
3441
|
-
static description = `Failed to
|
|
3429
|
+
static description = `Failed to list domains: {message}`;
|
|
3442
3430
|
}
|
|
3443
|
-
class
|
|
3431
|
+
class FailedToListVerificationsError extends Error {
|
|
3444
3432
|
constructor(body) {
|
|
3445
3433
|
super(
|
|
3446
|
-
`
|
|
3434
|
+
`FAILED_TO_LIST_VERIFICATIONS: ${body.message}`
|
|
3447
3435
|
);
|
|
3448
3436
|
this.body = body;
|
|
3449
|
-
this.name = "
|
|
3437
|
+
this.name = "FailedToListVerificationsError";
|
|
3450
3438
|
}
|
|
3451
|
-
static code = "
|
|
3439
|
+
static code = "FAILED_TO_LIST_VERIFICATIONS";
|
|
3440
|
+
static statusCode = 500;
|
|
3441
|
+
static description = `Failed to list verifications: {message}`;
|
|
3442
|
+
}
|
|
3443
|
+
class FailedToVerifyDomainError extends Error {
|
|
3444
|
+
constructor(body) {
|
|
3445
|
+
super(
|
|
3446
|
+
`FAILED_TO_VERIFY_DOMAIN: ${body.message}`
|
|
3447
|
+
);
|
|
3448
|
+
this.body = body;
|
|
3449
|
+
this.name = "FailedToVerifyDomainError";
|
|
3450
|
+
}
|
|
3451
|
+
static code = "FAILED_TO_VERIFY_DOMAIN";
|
|
3452
|
+
static statusCode = 500;
|
|
3453
|
+
static description = `Failed to verify domain: {message}`;
|
|
3454
|
+
}
|
|
3455
|
+
class VerificationFailedError extends Error {
|
|
3456
|
+
constructor(body) {
|
|
3457
|
+
super(
|
|
3458
|
+
`VERIFICATION_FAILED: ${body.message}`
|
|
3459
|
+
);
|
|
3460
|
+
this.body = body;
|
|
3461
|
+
this.name = "VerificationFailedError";
|
|
3462
|
+
}
|
|
3463
|
+
static code = "VERIFICATION_FAILED";
|
|
3452
3464
|
static statusCode = 400;
|
|
3453
|
-
static description = `Domain
|
|
3465
|
+
static description = `Domain verification failed: {message}`;
|
|
3466
|
+
}
|
|
3467
|
+
class FailedToDeleteVerificationError extends Error {
|
|
3468
|
+
constructor(body) {
|
|
3469
|
+
super(
|
|
3470
|
+
`FAILED_TO_DELETE_VERIFICATION: ${body.message}`
|
|
3471
|
+
);
|
|
3472
|
+
this.body = body;
|
|
3473
|
+
this.name = "FailedToDeleteVerificationError";
|
|
3474
|
+
}
|
|
3475
|
+
static code = "FAILED_TO_DELETE_VERIFICATION";
|
|
3476
|
+
static statusCode = 400;
|
|
3477
|
+
static description = `Failed to delete verification: {message}`;
|
|
3478
|
+
}
|
|
3479
|
+
class VerificationNotFoundError extends Error {
|
|
3480
|
+
constructor(body) {
|
|
3481
|
+
super(
|
|
3482
|
+
`VERIFICATION_NOT_FOUND: ${body.message}`
|
|
3483
|
+
);
|
|
3484
|
+
this.body = body;
|
|
3485
|
+
this.name = "VerificationNotFoundError";
|
|
3486
|
+
}
|
|
3487
|
+
static code = "VERIFICATION_NOT_FOUND";
|
|
3488
|
+
static statusCode = 404;
|
|
3489
|
+
static description = `Verification request not found for domain: {domain}`;
|
|
3490
|
+
}
|
|
3491
|
+
class FailedToCreateVerificationCodeError extends Error {
|
|
3492
|
+
constructor(body) {
|
|
3493
|
+
super(
|
|
3494
|
+
`FAILED_TO_CREATE_VERIFICATION_CODE: ${body.message}`
|
|
3495
|
+
);
|
|
3496
|
+
this.body = body;
|
|
3497
|
+
this.name = "FailedToCreateVerificationCodeError";
|
|
3498
|
+
}
|
|
3499
|
+
static code = "FAILED_TO_CREATE_VERIFICATION_CODE";
|
|
3500
|
+
static statusCode = 400;
|
|
3501
|
+
static description = `Failed to create verification code: {message}`;
|
|
3502
|
+
}
|
|
3503
|
+
class InvalidDomainError extends Error {
|
|
3504
|
+
constructor(body) {
|
|
3505
|
+
super(
|
|
3506
|
+
`INVALID_DOMAIN: ${body.message}`
|
|
3507
|
+
);
|
|
3508
|
+
this.body = body;
|
|
3509
|
+
this.name = "InvalidDomainError";
|
|
3510
|
+
}
|
|
3511
|
+
static code = "INVALID_DOMAIN";
|
|
3512
|
+
static statusCode = 400;
|
|
3513
|
+
static description = `Invalid domain: {domain}`;
|
|
3514
|
+
}
|
|
3515
|
+
class CloudstateInternalErrorError extends Error {
|
|
3516
|
+
constructor(body) {
|
|
3517
|
+
super(
|
|
3518
|
+
`CLOUDSTATE_INTERNAL_ERROR: ${body.message}`
|
|
3519
|
+
);
|
|
3520
|
+
this.body = body;
|
|
3521
|
+
this.name = "CloudstateInternalErrorError";
|
|
3522
|
+
}
|
|
3523
|
+
static code = "CLOUDSTATE_INTERNAL_ERROR";
|
|
3524
|
+
static statusCode = 500;
|
|
3525
|
+
static description = `Internal error: {message}`;
|
|
3526
|
+
}
|
|
3527
|
+
class CloudstateDatabaseErrorError extends Error {
|
|
3528
|
+
constructor(body) {
|
|
3529
|
+
super(
|
|
3530
|
+
`CLOUDSTATE_DATABASE_ERROR: ${body.message}`
|
|
3531
|
+
);
|
|
3532
|
+
this.body = body;
|
|
3533
|
+
this.name = "CloudstateDatabaseErrorError";
|
|
3534
|
+
}
|
|
3535
|
+
static code = "CLOUDSTATE_DATABASE_ERROR";
|
|
3536
|
+
static statusCode = 500;
|
|
3537
|
+
static description = `Database operation failed: {message}`;
|
|
3538
|
+
}
|
|
3539
|
+
class CloudstateAccessDeniedError extends Error {
|
|
3540
|
+
constructor(body) {
|
|
3541
|
+
super(
|
|
3542
|
+
`CLOUDSTATE_ACCESS_DENIED: ${body.message}`
|
|
3543
|
+
);
|
|
3544
|
+
this.body = body;
|
|
3545
|
+
this.name = "CloudstateAccessDeniedError";
|
|
3546
|
+
}
|
|
3547
|
+
static code = "CLOUDSTATE_ACCESS_DENIED";
|
|
3548
|
+
static statusCode = 403;
|
|
3549
|
+
static description = `Access denied to project: {project_id}`;
|
|
3550
|
+
}
|
|
3551
|
+
class RestoreFailedError extends Error {
|
|
3552
|
+
constructor(body) {
|
|
3553
|
+
super(
|
|
3554
|
+
`RESTORE_FAILED: ${body.message}`
|
|
3555
|
+
);
|
|
3556
|
+
this.body = body;
|
|
3557
|
+
this.name = "RestoreFailedError";
|
|
3558
|
+
}
|
|
3559
|
+
static code = "RESTORE_FAILED";
|
|
3560
|
+
static statusCode = 500;
|
|
3561
|
+
static description = `Failed to restore from backup: {message}`;
|
|
3562
|
+
}
|
|
3563
|
+
class CreateBackupFailedError extends Error {
|
|
3564
|
+
constructor(body) {
|
|
3565
|
+
super(
|
|
3566
|
+
`CREATE_BACKUP_FAILED: ${body.message}`
|
|
3567
|
+
);
|
|
3568
|
+
this.body = body;
|
|
3569
|
+
this.name = "CreateBackupFailedError";
|
|
3570
|
+
}
|
|
3571
|
+
static code = "CREATE_BACKUP_FAILED";
|
|
3572
|
+
static statusCode = 500;
|
|
3573
|
+
static description = `Failed to create backup: {message}`;
|
|
3574
|
+
}
|
|
3575
|
+
class BackupFailedError extends Error {
|
|
3576
|
+
constructor(body) {
|
|
3577
|
+
super(
|
|
3578
|
+
`BACKUP_FAILED: ${body.message}`
|
|
3579
|
+
);
|
|
3580
|
+
this.body = body;
|
|
3581
|
+
this.name = "BackupFailedError";
|
|
3582
|
+
}
|
|
3583
|
+
static code = "BACKUP_FAILED";
|
|
3584
|
+
static statusCode = 500;
|
|
3585
|
+
static description = `Backup failed: {message}`;
|
|
3454
3586
|
}
|
|
3455
|
-
class
|
|
3587
|
+
class DeploymentFailedError extends Error {
|
|
3456
3588
|
constructor(body) {
|
|
3457
3589
|
super(
|
|
3458
|
-
`
|
|
3590
|
+
`DEPLOYMENT_FAILED: ${body.message}`
|
|
3459
3591
|
);
|
|
3460
3592
|
this.body = body;
|
|
3461
|
-
this.name = "
|
|
3593
|
+
this.name = "DeploymentFailedError";
|
|
3462
3594
|
}
|
|
3463
|
-
static code = "
|
|
3595
|
+
static code = "DEPLOYMENT_FAILED";
|
|
3464
3596
|
static statusCode = 500;
|
|
3465
|
-
static description = `
|
|
3597
|
+
static description = `Deployment failed: {message}`;
|
|
3466
3598
|
}
|
|
3467
|
-
class
|
|
3599
|
+
class InvalidDeploymentRequestError extends Error {
|
|
3468
3600
|
constructor(body) {
|
|
3469
3601
|
super(
|
|
3470
|
-
`
|
|
3602
|
+
`INVALID_DEPLOYMENT_REQUEST: ${body.message}`
|
|
3471
3603
|
);
|
|
3472
3604
|
this.body = body;
|
|
3473
|
-
this.name = "
|
|
3605
|
+
this.name = "InvalidDeploymentRequestError";
|
|
3474
3606
|
}
|
|
3475
|
-
static code = "
|
|
3476
|
-
static statusCode =
|
|
3477
|
-
static description = `
|
|
3607
|
+
static code = "INVALID_DEPLOYMENT_REQUEST";
|
|
3608
|
+
static statusCode = 400;
|
|
3609
|
+
static description = `Invalid deployment request: {message}`;
|
|
3478
3610
|
}
|
|
3479
|
-
class
|
|
3611
|
+
class ProjectNotFoundError extends Error {
|
|
3480
3612
|
constructor(body) {
|
|
3481
3613
|
super(
|
|
3482
|
-
`
|
|
3614
|
+
`PROJECT_NOT_FOUND: ${body.message}`
|
|
3483
3615
|
);
|
|
3484
3616
|
this.body = body;
|
|
3485
|
-
this.name = "
|
|
3617
|
+
this.name = "ProjectNotFoundError";
|
|
3486
3618
|
}
|
|
3487
|
-
static code = "
|
|
3488
|
-
static statusCode =
|
|
3489
|
-
static description = `
|
|
3619
|
+
static code = "PROJECT_NOT_FOUND";
|
|
3620
|
+
static statusCode = 404;
|
|
3621
|
+
static description = `Project not found: {project_id}`;
|
|
3490
3622
|
}
|
|
3491
|
-
class
|
|
3623
|
+
class GitRepoLimitExceededError extends Error {
|
|
3492
3624
|
constructor(body) {
|
|
3493
3625
|
super(
|
|
3494
|
-
`
|
|
3626
|
+
`GIT_REPO_LIMIT_EXCEEDED: ${body.message}`
|
|
3495
3627
|
);
|
|
3496
3628
|
this.body = body;
|
|
3497
|
-
this.name = "
|
|
3629
|
+
this.name = "GitRepoLimitExceededError";
|
|
3498
3630
|
}
|
|
3499
|
-
static code = "
|
|
3500
|
-
static statusCode =
|
|
3501
|
-
static description = `
|
|
3631
|
+
static code = "GIT_REPO_LIMIT_EXCEEDED";
|
|
3632
|
+
static statusCode = 403;
|
|
3633
|
+
static description = `Repository limit exceeded: your plan allows {limit} repositories, you currently have {current}`;
|
|
3502
3634
|
}
|
|
3503
3635
|
class EmptyTagError extends Error {
|
|
3504
3636
|
constructor(body) {
|
|
@@ -3512,18 +3644,6 @@ class EmptyTagError extends Error {
|
|
|
3512
3644
|
static statusCode = 400;
|
|
3513
3645
|
static description = `Invalid request: tag cannot be empty`;
|
|
3514
3646
|
}
|
|
3515
|
-
class BranchNameEmptyError extends Error {
|
|
3516
|
-
constructor(body) {
|
|
3517
|
-
super(
|
|
3518
|
-
`BRANCH_NAME_EMPTY: ${body.message}`
|
|
3519
|
-
);
|
|
3520
|
-
this.body = body;
|
|
3521
|
-
this.name = "BranchNameEmptyError";
|
|
3522
|
-
}
|
|
3523
|
-
static code = "BRANCH_NAME_EMPTY";
|
|
3524
|
-
static statusCode = 400;
|
|
3525
|
-
static description = `Branch name cannot be empty`;
|
|
3526
|
-
}
|
|
3527
3647
|
const FREESTYLE_ERROR_CODE_MAP = {
|
|
3528
3648
|
"GIT_ERROR": GitErrorError,
|
|
3529
3649
|
"BAD_PARSE": BadParseError,
|
|
@@ -3531,31 +3651,10 @@ const FREESTYLE_ERROR_CODE_MAP = {
|
|
|
3531
3651
|
"BAD_SIGNATURE": BadSignatureError,
|
|
3532
3652
|
"BAD_HEADER": BadHeaderError,
|
|
3533
3653
|
"BAD_KEY": BadKeyError,
|
|
3534
|
-
"SNAPSHOT_SETUP_FAILED": SnapshotSetupFailedError,
|
|
3535
|
-
"SNAPSHOT_VM_BAD_REQUEST": SnapshotVmBadRequestError,
|
|
3536
|
-
"RESIZE_VM_MEM_NOT_POWER_OF_TWO": ResizeVmMemNotPowerOfTwoError,
|
|
3537
|
-
"RESIZE_VM_VCPU_NOT_POWER_OF_TWO": ResizeVmVcpuNotPowerOfTwoError,
|
|
3538
|
-
"RESIZE_VM_MEM_OUT_OF_RANGE": ResizeVmMemOutOfRangeError,
|
|
3539
|
-
"RESIZE_VM_VCPU_OUT_OF_RANGE": ResizeVmVcpuOutOfRangeError,
|
|
3540
|
-
"RESIZE_VM_ROOTFS_SHRINK_NOT_SUPPORTED": ResizeVmRootfsShrinkNotSupportedError,
|
|
3541
|
-
"RESIZE_VM_EMPTY_REQUEST": ResizeVmEmptyRequestError,
|
|
3542
|
-
"EXEC_TIMED_OUT": ExecTimedOutError,
|
|
3543
|
-
"NO_DEFAULT_SNAPSHOT_AVAILABLE": NoDefaultSnapshotAvailableError,
|
|
3544
|
-
"DOCKER_SNAPSHOT_FAILED": DockerSnapshotFailedError,
|
|
3545
|
-
"SET_DEFAULT_SNAPSHOT_FAILED": SetDefaultSnapshotFailedError,
|
|
3546
|
-
"SNAPSHOT_LAYER_CREATION_FAILED": SnapshotLayerCreationFailedError,
|
|
3547
|
-
"SNAPSHOT_DIR_NOT_FOUND": SnapshotDirNotFoundError,
|
|
3548
|
-
"SUBVOLUME_CREATION_FAILED": SubvolumeCreationFailedError,
|
|
3549
|
-
"GET_DEFAULT_SNAPSHOT_FAILED": GetDefaultSnapshotFailedError,
|
|
3550
3654
|
"VM_OPERATION_DENIED_DURING_TRANSACTION": VmOperationDeniedDuringTransactionError,
|
|
3551
3655
|
"VM_TRANSACTION_ID_MISMATCH": VmTransactionIdMismatchError,
|
|
3552
3656
|
"VM_NOT_IN_TRANSACTION": VmNotInTransactionError,
|
|
3553
|
-
"
|
|
3554
|
-
"NON_LEAF_LAYER_FIELD_ERROR": NonLeafLayerFieldErrorError,
|
|
3555
|
-
"INVALID_GIT_REPO_SPEC_ERROR": InvalidGitRepoSpecErrorError,
|
|
3556
|
-
"INTERNAL_ERROR": InternalErrorError,
|
|
3557
|
-
"FORK_VM_NOT_FOUND": ForkVmNotFoundError,
|
|
3558
|
-
"CREATE_SNAPSHOT_BAD_REQUEST": CreateSnapshotBadRequestError,
|
|
3657
|
+
"PARTITION_NOT_FOUND": PartitionNotFoundError,
|
|
3559
3658
|
"USER_NOT_FOUND": UserNotFoundError,
|
|
3560
3659
|
"USER_ALREADY_EXISTS": UserAlreadyExistsError,
|
|
3561
3660
|
"VALIDATION_ERROR": ValidationErrorError,
|
|
@@ -3572,18 +3671,55 @@ const FREESTYLE_ERROR_CODE_MAP = {
|
|
|
3572
3671
|
"GROUP_NAME_INVALID_CHARS": GroupNameInvalidCharsError,
|
|
3573
3672
|
"GROUP_NAME_TOO_LONG": GroupNameTooLongError,
|
|
3574
3673
|
"GROUP_NAME_EMPTY": GroupNameEmptyError,
|
|
3674
|
+
"NO_DEFAULT_SNAPSHOT_AVAILABLE": NoDefaultSnapshotAvailableError,
|
|
3675
|
+
"DOCKER_SNAPSHOT_FAILED": DockerSnapshotFailedError,
|
|
3676
|
+
"SET_DEFAULT_SNAPSHOT_FAILED": SetDefaultSnapshotFailedError,
|
|
3677
|
+
"SNAPSHOT_LAYER_CREATION_FAILED": SnapshotLayerCreationFailedError,
|
|
3678
|
+
"SNAPSHOT_DIR_NOT_FOUND": SnapshotDirNotFoundError,
|
|
3679
|
+
"SUBVOLUME_CREATION_FAILED": SubvolumeCreationFailedError,
|
|
3680
|
+
"GET_DEFAULT_SNAPSHOT_FAILED": GetDefaultSnapshotFailedError,
|
|
3575
3681
|
"VM_NOT_FOUND_IN_FS": VmNotFoundInFsError,
|
|
3682
|
+
"DATABASE_ERROR": DatabaseErrorError,
|
|
3683
|
+
"INVALID_VM_ID": InvalidVmIdError,
|
|
3684
|
+
"VM_DELETED": VmDeletedError,
|
|
3576
3685
|
"VM_NOT_RUNNING": VmNotRunningError,
|
|
3686
|
+
"ACTIVE_TRANSACTION_ERROR": ActiveTransactionErrorError,
|
|
3687
|
+
"SWAP_VM_TAP": SwapVmTapError,
|
|
3688
|
+
"PREASSIGNED_VM_ID_COUNT_MISMATCH": PreassignedVmIdCountMismatchError,
|
|
3689
|
+
"INTERNAL_ERROR": InternalErrorError,
|
|
3690
|
+
"ROOTFS_COPY_ERROR": RootfsCopyErrorError,
|
|
3691
|
+
"FILE_NOT_FOUND": FileNotFoundError,
|
|
3692
|
+
"FILES_BAD_REQUEST": FilesBadRequestError,
|
|
3577
3693
|
"VM_NOT_FOUND": VmNotFoundError,
|
|
3578
3694
|
"INTERNAL_FORK_VM_NOT_FOUND": InternalForkVmNotFoundError,
|
|
3579
3695
|
"BAD_REQUEST": BadRequestError,
|
|
3580
3696
|
"INTERNAL_VM_NOT_FOUND": InternalVmNotFoundError,
|
|
3697
|
+
"SNAPSHOT_IS_ACCOUNT_DEFAULT": SnapshotIsAccountDefaultError,
|
|
3698
|
+
"SNAPSHOT_ALREADY_DELETED": SnapshotAlreadyDeletedError,
|
|
3581
3699
|
"SNAPSHOT_NOT_FOUND": SnapshotNotFoundError,
|
|
3700
|
+
"SNAPSHOT_SETUP_FAILED": SnapshotSetupFailedError,
|
|
3701
|
+
"SNAPSHOT_VM_BAD_REQUEST": SnapshotVmBadRequestError,
|
|
3702
|
+
"STARTING_HANDLE_INSTANCE_ID_MISMATCH": StartingHandleInstanceIdMismatchError,
|
|
3703
|
+
"SUSPEND_FAILED_AND_STOP_FAILED": SuspendFailedAndStopFailedError,
|
|
3704
|
+
"SUSPEND_FAILED_AND_STOPPED": SuspendFailedAndStoppedError,
|
|
3705
|
+
"RESIZE_VM_MEM_NOT_POWER_OF_TWO": ResizeVmMemNotPowerOfTwoError,
|
|
3706
|
+
"RESIZE_VM_VCPU_NOT_POWER_OF_TWO": ResizeVmVcpuNotPowerOfTwoError,
|
|
3707
|
+
"RESIZE_VM_MEM_OUT_OF_RANGE": ResizeVmMemOutOfRangeError,
|
|
3708
|
+
"RESIZE_VM_VCPU_OUT_OF_RANGE": ResizeVmVcpuOutOfRangeError,
|
|
3709
|
+
"RESIZE_VM_ROOTFS_SHRINK_NOT_SUPPORTED": ResizeVmRootfsShrinkNotSupportedError,
|
|
3710
|
+
"RESIZE_VM_EMPTY_REQUEST": ResizeVmEmptyRequestError,
|
|
3711
|
+
"EXEC_TIMED_OUT": ExecTimedOutError,
|
|
3712
|
+
"CONFLICTING_SPEC_SOURCES_ERROR": ConflictingSpecSourcesErrorError,
|
|
3713
|
+
"NON_LEAF_LAYER_FIELD_ERROR": NonLeafLayerFieldErrorError,
|
|
3714
|
+
"INVALID_GIT_REPO_SPEC_ERROR": InvalidGitRepoSpecErrorError,
|
|
3715
|
+
"FORK_VM_NOT_FOUND": ForkVmNotFoundError,
|
|
3716
|
+
"CREATE_SNAPSHOT_BAD_REQUEST": CreateSnapshotBadRequestError,
|
|
3717
|
+
"UNSUPPORTED_OS": UnsupportedOsError,
|
|
3718
|
+
"BUILD_FAILED": BuildFailedError,
|
|
3582
3719
|
"RESUMED_VM_NON_RESPONSIVE": ResumedVmNonResponsiveError,
|
|
3583
3720
|
"SNAPSHOT_LOAD_TIMEOUT": SnapshotLoadTimeoutError,
|
|
3584
3721
|
"UFFD_TIMEOUT_ERROR": UffdTimeoutErrorError,
|
|
3585
3722
|
"KERNEL_PANIC": KernelPanicError,
|
|
3586
|
-
"VM_DELETED": VmDeletedError,
|
|
3587
3723
|
"REQWEST": ReqwestError,
|
|
3588
3724
|
"FIRECRACKER_PID_NOT_FOUND": FirecrackerPidNotFoundError,
|
|
3589
3725
|
"FIRECRACKER_API_SOCKET_NOT_FOUND": FirecrackerApiSocketNotFoundError,
|
|
@@ -3595,18 +3731,6 @@ const FREESTYLE_ERROR_CODE_MAP = {
|
|
|
3595
3731
|
"FAILED_TO_SPAWN_UFFD": FailedToSpawnUffdError,
|
|
3596
3732
|
"VM_SPAWN_PROCESS": VmSpawnProcessError,
|
|
3597
3733
|
"VM_SUBNET_NOT_FOUND": VmSubnetNotFoundError,
|
|
3598
|
-
"PARTITION_NOT_FOUND": PartitionNotFoundError,
|
|
3599
|
-
"ACTIVE_TRANSACTION_ERROR": ActiveTransactionErrorError,
|
|
3600
|
-
"SWAP_VM_TAP": SwapVmTapError,
|
|
3601
|
-
"ROOTFS_COPY_ERROR": RootfsCopyErrorError,
|
|
3602
|
-
"FILE_NOT_FOUND": FileNotFoundError,
|
|
3603
|
-
"FILES_BAD_REQUEST": FilesBadRequestError,
|
|
3604
|
-
"SNAPSHOT_IS_ACCOUNT_DEFAULT": SnapshotIsAccountDefaultError,
|
|
3605
|
-
"SNAPSHOT_ALREADY_DELETED": SnapshotAlreadyDeletedError,
|
|
3606
|
-
"SUSPEND_FAILED_AND_STOP_FAILED": SuspendFailedAndStopFailedError,
|
|
3607
|
-
"SUSPEND_FAILED_AND_STOPPED": SuspendFailedAndStoppedError,
|
|
3608
|
-
"DATABASE_ERROR": DatabaseErrorError,
|
|
3609
|
-
"INVALID_VM_ID": InvalidVmIdError,
|
|
3610
3734
|
"CREATE_VM_MEM_NOT_POWER_OF_TWO": CreateVmMemNotPowerOfTwoError,
|
|
3611
3735
|
"CREATE_VM_VCPU_NOT_POWER_OF_TWO": CreateVmVcpuNotPowerOfTwoError,
|
|
3612
3736
|
"CREATE_VM_ROOTFS_OUT_OF_RANGE": CreateVmRootfsOutOfRangeError,
|
|
@@ -3640,6 +3764,24 @@ const FREESTYLE_ERROR_CODE_MAP = {
|
|
|
3640
3764
|
"INVALID_PARAMETERS": InvalidParametersError,
|
|
3641
3765
|
"MAX_USES_EXCEEDED": MaxUsesExceededError,
|
|
3642
3766
|
"EXPIRED": ExpiredError,
|
|
3767
|
+
"NOT_FOUND": NotFoundError,
|
|
3768
|
+
"TREE_NOT_FOUND": TreeNotFoundError,
|
|
3769
|
+
"BRANCH_NOT_FOUND": BranchNotFoundError,
|
|
3770
|
+
"COMMIT_NOT_FOUND": CommitNotFoundError,
|
|
3771
|
+
"PARENT_NOT_FOUND": ParentNotFoundError,
|
|
3772
|
+
"NO_DEFAULT_BRANCH": NoDefaultBranchError,
|
|
3773
|
+
"INVALID_BASE64_CONTENT": InvalidBase64ContentError,
|
|
3774
|
+
"INVALID_FILE_CHANGE": InvalidFileChangeError,
|
|
3775
|
+
"INVALID_FILE_PATH": InvalidFilePathError,
|
|
3776
|
+
"CONFLICTING_PARENT": ConflictingParentError,
|
|
3777
|
+
"AMBIGUOUS": AmbiguousError,
|
|
3778
|
+
"INVALID": InvalidError,
|
|
3779
|
+
"CONFLICT": ConflictError,
|
|
3780
|
+
"BRANCH_ALREADY_EXISTS": BranchAlreadyExistsError,
|
|
3781
|
+
"PATH_NOT_FOUND": PathNotFoundError,
|
|
3782
|
+
"REFERENCE_NOT_FOUND": ReferenceNotFoundError,
|
|
3783
|
+
"INVALID_SERVICE": InvalidServiceError,
|
|
3784
|
+
"EXPECTED_SERVICE": ExpectedServiceError,
|
|
3643
3785
|
"UNAUTHORIZED": UnauthorizedError,
|
|
3644
3786
|
"FORBIDDEN": ForbiddenError,
|
|
3645
3787
|
"INVALID_ACCOUNT_ID": InvalidAccountIdError,
|
|
@@ -3648,17 +3790,11 @@ const FREESTYLE_ERROR_CODE_MAP = {
|
|
|
3648
3790
|
"SOURCE_NOT_FOUND": SourceNotFoundError,
|
|
3649
3791
|
"IMPORT_SUBDIR_NOT_FOUND": ImportSubdirNotFoundError,
|
|
3650
3792
|
"REPO_ALREADY_EXISTS": RepoAlreadyExistsError,
|
|
3651
|
-
"
|
|
3652
|
-
"UNSUPPORTED_TRANSFER": UnsupportedTransferError,
|
|
3653
|
-
"BRANCH_NOT_FOUND": BranchNotFoundError,
|
|
3654
|
-
"NOT_FOUND": NotFoundError,
|
|
3655
|
-
"SEND_ERROR": SendErrorError,
|
|
3793
|
+
"TAG_NOT_FOUND": TagNotFoundError,
|
|
3656
3794
|
"INVALID_REVISION": InvalidRevisionError,
|
|
3657
|
-
"
|
|
3658
|
-
"
|
|
3659
|
-
"
|
|
3660
|
-
"INVALID_SERVICE": InvalidServiceError,
|
|
3661
|
-
"EXPECTED_SERVICE": ExpectedServiceError,
|
|
3795
|
+
"BLOB_NOT_FOUND": BlobNotFoundError,
|
|
3796
|
+
"SEND_ERROR": SendErrorError,
|
|
3797
|
+
"UNSUPPORTED_TRANSFER": UnsupportedTransferError,
|
|
3662
3798
|
"DIFF_INVALID_PATH_PATTERN": DiffInvalidPathPatternError,
|
|
3663
3799
|
"DIFF_INVALID_REGEX": DiffInvalidRegexError,
|
|
3664
3800
|
"DIFF_EMPTY_QUERY": DiffEmptyQueryError,
|
|
@@ -3669,94 +3805,21 @@ const FREESTYLE_ERROR_CODE_MAP = {
|
|
|
3669
3805
|
"INVALID_REGEX": InvalidRegexError,
|
|
3670
3806
|
"INVALID_PATH_PATTERN": InvalidPathPatternError,
|
|
3671
3807
|
"EMPTY_QUERY": EmptyQueryError,
|
|
3672
|
-
"
|
|
3673
|
-
"NO_DEFAULT_BRANCH": NoDefaultBranchError,
|
|
3674
|
-
"INVALID_BASE64_CONTENT": InvalidBase64ContentError,
|
|
3675
|
-
"INVALID_FILE_CHANGE": InvalidFileChangeError,
|
|
3676
|
-
"INVALID_FILE_PATH": InvalidFilePathError,
|
|
3677
|
-
"CONFLICTING_PARENT": ConflictingParentError,
|
|
3678
|
-
"TREE_NOT_FOUND": TreeNotFoundError,
|
|
3679
|
-
"BRANCH_ALREADY_EXISTS": BranchAlreadyExistsError,
|
|
3680
|
-
"PARENT_NOT_FOUND": ParentNotFoundError,
|
|
3681
|
-
"TAG_NOT_FOUND": TagNotFoundError,
|
|
3808
|
+
"PACKFILE": PackfileError,
|
|
3682
3809
|
"INVALID_RANGE": InvalidRangeError,
|
|
3683
3810
|
"OFFSET_WITH_SELECTOR": OffsetWithSelectorError,
|
|
3684
3811
|
"COMMIT_NOT_IN_BRANCH": CommitNotInBranchError,
|
|
3685
|
-
"BLOB_NOT_FOUND": BlobNotFoundError,
|
|
3686
|
-
"AMBIGUOUS": AmbiguousError,
|
|
3687
|
-
"INVALID": InvalidError,
|
|
3688
3812
|
"GIT_HUB_SYNC_CONFLICT": GitHubSyncConflictError,
|
|
3689
3813
|
"INVALID_OBJECT_ID": InvalidObjectIdError,
|
|
3814
|
+
"TOO_MANY_CONCURRENT_REPAIRS": TooManyConcurrentRepairsError,
|
|
3815
|
+
"ALREADY_IN_PROGRESS": AlreadyInProgressError,
|
|
3816
|
+
"JOB_NOT_FOUND": JobNotFoundError,
|
|
3690
3817
|
"UNAVAILABLE": UnavailableError,
|
|
3691
3818
|
"SCHEDULE_NOT_FOUND": ScheduleNotFoundError,
|
|
3692
3819
|
"SERVICE_UNAVAILABLE": ServiceUnavailableError,
|
|
3693
|
-
"
|
|
3694
|
-
"
|
|
3695
|
-
"
|
|
3696
|
-
"REVOKE_TOKEN_FAILED": RevokeTokenFailedError,
|
|
3697
|
-
"CREATE_TOKEN_FAILED": CreateTokenFailedError,
|
|
3698
|
-
"LIST_PERMISSIONS_FAILED": ListPermissionsFailedError,
|
|
3699
|
-
"GET_PERMISSION_FAILED": GetPermissionFailedError,
|
|
3700
|
-
"UPDATE_PERMISSION_FAILED": UpdatePermissionFailedError,
|
|
3701
|
-
"REVOKE_PERMISSION_FAILED": RevokePermissionFailedError,
|
|
3702
|
-
"GRANT_PERMISSION_FAILED": GrantPermissionFailedError,
|
|
3703
|
-
"LIST_IDENTITIES_FAILED": ListIdentitiesFailedError,
|
|
3704
|
-
"DELETE_IDENTITY_FAILED": DeleteIdentityFailedError,
|
|
3705
|
-
"CREATE_IDENTITY_FAILED": CreateIdentityFailedError,
|
|
3706
|
-
"VM_PERMISSION_NOT_FOUND": VmPermissionNotFoundError,
|
|
3707
|
-
"PERMISSION_NOT_FOUND": PermissionNotFoundError,
|
|
3708
|
-
"GIT_REPOSITORY_ACCESS_DENIED": GitRepositoryAccessDeniedError,
|
|
3709
|
-
"GIT_REPOSITORY_NOT_FOUND": GitRepositoryNotFoundError,
|
|
3710
|
-
"CANNOT_DELETE_MANAGED_IDENTITY": CannotDeleteManagedIdentityError,
|
|
3711
|
-
"CANNOT_MODIFY_MANAGED_IDENTITY": CannotModifyManagedIdentityError,
|
|
3712
|
-
"IDENTITY_ACCESS_DENIED": IdentityAccessDeniedError,
|
|
3713
|
-
"IDENTITY_NOT_FOUND": IdentityNotFoundError,
|
|
3714
|
-
"UNAUTHORIZED_ERROR": UnauthorizedErrorError,
|
|
3715
|
-
"LIMIT_EXCEEDED": LimitExceededError,
|
|
3716
|
-
"FAILED_TO_PROVISION_CERTIFICATE": FailedToProvisionCertificateError,
|
|
3717
|
-
"FAILED_TO_INSERT_DOMAIN_MAPPING": FailedToInsertDomainMappingError,
|
|
3718
|
-
"PERMISSION_DENIED": PermissionDeniedError,
|
|
3719
|
-
"FAILED_TO_CHECK_PERMISSIONS": FailedToCheckPermissionsError,
|
|
3720
|
-
"FAILED_TO_LIST_DOMAINS": FailedToListDomainsError,
|
|
3721
|
-
"FAILED_TO_LIST_VERIFICATIONS": FailedToListVerificationsError,
|
|
3722
|
-
"FAILED_TO_VERIFY_DOMAIN": FailedToVerifyDomainError,
|
|
3723
|
-
"VERIFICATION_FAILED": VerificationFailedError,
|
|
3724
|
-
"FAILED_TO_DELETE_VERIFICATION": FailedToDeleteVerificationError,
|
|
3725
|
-
"VERIFICATION_NOT_FOUND": VerificationNotFoundError,
|
|
3726
|
-
"FAILED_TO_CREATE_VERIFICATION_CODE": FailedToCreateVerificationCodeError,
|
|
3727
|
-
"INVALID_DOMAIN": InvalidDomainError,
|
|
3728
|
-
"CLOUDSTATE_INTERNAL_ERROR": CloudstateInternalErrorError,
|
|
3729
|
-
"CLOUDSTATE_DATABASE_ERROR": CloudstateDatabaseErrorError,
|
|
3730
|
-
"CLOUDSTATE_ACCESS_DENIED": CloudstateAccessDeniedError,
|
|
3731
|
-
"RESTORE_FAILED": RestoreFailedError,
|
|
3732
|
-
"CREATE_BACKUP_FAILED": CreateBackupFailedError,
|
|
3733
|
-
"BACKUP_FAILED": BackupFailedError,
|
|
3734
|
-
"DEPLOYMENT_FAILED": DeploymentFailedError,
|
|
3735
|
-
"INVALID_DEPLOYMENT_REQUEST": InvalidDeploymentRequestError,
|
|
3736
|
-
"PROJECT_NOT_FOUND": ProjectNotFoundError,
|
|
3737
|
-
"ACCESS_DENIED": AccessDeniedError,
|
|
3738
|
-
"BUILD_FAILED": BuildFailedError,
|
|
3739
|
-
"SERVER_DEPLOYMENT_FAILED": ServerDeploymentFailedError,
|
|
3740
|
-
"LOCKFILE_ERROR": LockfileErrorError,
|
|
3741
|
-
"UPLOAD_ERROR": UploadErrorError,
|
|
3742
|
-
"DOMAIN_MAPPING_ERROR": DomainMappingErrorError,
|
|
3743
|
-
"CERTIFICATE_PROVISIONING_ERROR": CertificateProvisioningErrorError,
|
|
3744
|
-
"NO_ENTRYPOINT_FOUND": NoEntrypointFoundError,
|
|
3745
|
-
"ENTRYPOINT_NOT_FOUND": EntrypointNotFoundError,
|
|
3746
|
-
"NO_DOMAIN_OWNERSHIP": NoDomainOwnershipError,
|
|
3747
|
-
"INVALID_DOMAINS": InvalidDomainsError,
|
|
3748
|
-
"WEB_DEPLOYMENT_BAD_REQUEST": WebDeploymentBadRequestError,
|
|
3749
|
-
"TIMEOUT_LIMIT_EXCEEDED": TimeoutLimitExceededError,
|
|
3750
|
-
"DEPLOYMENT_LIMIT_EXCEEDED": DeploymentLimitExceededError,
|
|
3751
|
-
"DEPLOYMENT_NOT_FOUND": DeploymentNotFoundError,
|
|
3752
|
-
"RESIZE_FAILED": ResizeFailedError,
|
|
3753
|
-
"INTERNAL_RESIZE_VM_NOT_FOUND": InternalResizeVmNotFoundError,
|
|
3754
|
-
"DOMAIN_OWNERSHIP_VERIFICATION_FAILED": DomainOwnershipVerificationFailedError,
|
|
3755
|
-
"ERROR_DELETING_RECORD": ErrorDeletingRecordError,
|
|
3756
|
-
"RECORD_OWNERSHIP_ERROR": RecordOwnershipErrorError,
|
|
3757
|
-
"ERROR_CREATING_RECORD": ErrorCreatingRecordError,
|
|
3758
|
-
"DOMAIN_OWNERSHIP_ERROR": DomainOwnershipErrorError,
|
|
3759
|
-
"GIT_REPO_LIMIT_EXCEEDED": GitRepoLimitExceededError,
|
|
3820
|
+
"REPAIR_ALREADY_IN_PROGRESS": RepairAlreadyInProgressError,
|
|
3821
|
+
"MEMORY_STORAGE_QUOTA_EXCEEDED": MemoryStorageQuotaExceededError,
|
|
3822
|
+
"ROOTFS_STORAGE_QUOTA_EXCEEDED": RootfsStorageQuotaExceededError,
|
|
3760
3823
|
"ROOTFS_SIZE_TOO_LARGE": RootfsSizeTooLargeError,
|
|
3761
3824
|
"MEM_SIZE_TOO_LARGE": MemSizeTooLargeError,
|
|
3762
3825
|
"ROOTFS_OVER_PLAN_LIMIT": RootfsOverPlanLimitError,
|
|
@@ -3792,6 +3855,61 @@ const FREESTYLE_ERROR_CODE_MAP = {
|
|
|
3792
3855
|
"SERIALIZATION_ERROR": SerializationErrorError,
|
|
3793
3856
|
"GIT_INVALID_REQUEST": GitInvalidRequestError,
|
|
3794
3857
|
"REPOSITORY_NOT_FOUND": RepositoryNotFoundError,
|
|
3858
|
+
"DOMAIN_OWNERSHIP_VERIFICATION_FAILED": DomainOwnershipVerificationFailedError,
|
|
3859
|
+
"ERROR_DELETING_RECORD": ErrorDeletingRecordError,
|
|
3860
|
+
"RECORD_OWNERSHIP_ERROR": RecordOwnershipErrorError,
|
|
3861
|
+
"ERROR_CREATING_RECORD": ErrorCreatingRecordError,
|
|
3862
|
+
"DOMAIN_OWNERSHIP_ERROR": DomainOwnershipErrorError,
|
|
3863
|
+
"UNAUTHORIZED_ERROR": UnauthorizedErrorError,
|
|
3864
|
+
"BRANCH_NAME_EMPTY": BranchNameEmptyError,
|
|
3865
|
+
"SERVER_DEPLOYMENT_FAILED": ServerDeploymentFailedError,
|
|
3866
|
+
"LOCKFILE_ERROR": LockfileErrorError,
|
|
3867
|
+
"UPLOAD_ERROR": UploadErrorError,
|
|
3868
|
+
"DOMAIN_MAPPING_ERROR": DomainMappingErrorError,
|
|
3869
|
+
"CERTIFICATE_PROVISIONING_ERROR": CertificateProvisioningErrorError,
|
|
3870
|
+
"NO_ENTRYPOINT_FOUND": NoEntrypointFoundError,
|
|
3871
|
+
"ENTRYPOINT_NOT_FOUND": EntrypointNotFoundError,
|
|
3872
|
+
"NO_DOMAIN_OWNERSHIP": NoDomainOwnershipError,
|
|
3873
|
+
"INVALID_DOMAINS": InvalidDomainsError,
|
|
3874
|
+
"WEB_DEPLOYMENT_BAD_REQUEST": WebDeploymentBadRequestError,
|
|
3875
|
+
"TIMEOUT_LIMIT_EXCEEDED": TimeoutLimitExceededError,
|
|
3876
|
+
"DEPLOYMENT_LIMIT_EXCEEDED": DeploymentLimitExceededError,
|
|
3877
|
+
"DEPLOYMENT_NOT_FOUND": DeploymentNotFoundError,
|
|
3878
|
+
"RESIZE_FAILED": ResizeFailedError,
|
|
3879
|
+
"INTERNAL_RESIZE_VM_NOT_FOUND": InternalResizeVmNotFoundError,
|
|
3880
|
+
"EXECUTE_LIMIT_EXCEEDED": ExecuteLimitExceededError,
|
|
3881
|
+
"DOMAIN_OWNERSHIP_NOT_VERIFIED": DomainOwnershipNotVerifiedError,
|
|
3882
|
+
"VM_ACCESS_DENIED_FOR_MAPPING": VmAccessDeniedForMappingError,
|
|
3883
|
+
"DEPLOYMENT_ACCESS_DENIED": DeploymentAccessDeniedError,
|
|
3884
|
+
"FAILED_TO_PROVISION_CERTIFICATE_FOR_MAPPING": FailedToProvisionCertificateForMappingError,
|
|
3885
|
+
"FAILED_INSERT_DOMAIN_MAPPING": FailedInsertDomainMappingError,
|
|
3886
|
+
"DOMAIN_ALREADY_EXISTS": DomainAlreadyExistsError,
|
|
3887
|
+
"FAILED_TO_INSERT_OWNERSHIP": FailedToInsertOwnershipError,
|
|
3888
|
+
"FAILED_REMOVE_DOMAIN_MAPPING": FailedRemoveDomainMappingError,
|
|
3889
|
+
"FAILED_PERMISSIONS_CHECK": FailedPermissionsCheckError,
|
|
3890
|
+
"FAILED_TO_CHECK_DOMAIN_MAPPING_PERMISSIONS": FailedToCheckDomainMappingPermissionsError,
|
|
3891
|
+
"FAILED_TO_PRE_REGISTER": FailedToPreRegisterError,
|
|
3892
|
+
"ACCESS_DENIED": AccessDeniedError,
|
|
3893
|
+
"PERMISSION_ALREADY_EXISTS": PermissionAlreadyExistsError,
|
|
3894
|
+
"LIST_TOKENS_FAILED": ListTokensFailedError,
|
|
3895
|
+
"REVOKE_TOKEN_FAILED": RevokeTokenFailedError,
|
|
3896
|
+
"CREATE_TOKEN_FAILED": CreateTokenFailedError,
|
|
3897
|
+
"LIST_PERMISSIONS_FAILED": ListPermissionsFailedError,
|
|
3898
|
+
"GET_PERMISSION_FAILED": GetPermissionFailedError,
|
|
3899
|
+
"UPDATE_PERMISSION_FAILED": UpdatePermissionFailedError,
|
|
3900
|
+
"REVOKE_PERMISSION_FAILED": RevokePermissionFailedError,
|
|
3901
|
+
"GRANT_PERMISSION_FAILED": GrantPermissionFailedError,
|
|
3902
|
+
"LIST_IDENTITIES_FAILED": ListIdentitiesFailedError,
|
|
3903
|
+
"DELETE_IDENTITY_FAILED": DeleteIdentityFailedError,
|
|
3904
|
+
"CREATE_IDENTITY_FAILED": CreateIdentityFailedError,
|
|
3905
|
+
"VM_PERMISSION_NOT_FOUND": VmPermissionNotFoundError,
|
|
3906
|
+
"PERMISSION_NOT_FOUND": PermissionNotFoundError,
|
|
3907
|
+
"GIT_REPOSITORY_ACCESS_DENIED": GitRepositoryAccessDeniedError,
|
|
3908
|
+
"GIT_REPOSITORY_NOT_FOUND": GitRepositoryNotFoundError,
|
|
3909
|
+
"CANNOT_DELETE_MANAGED_IDENTITY": CannotDeleteManagedIdentityError,
|
|
3910
|
+
"CANNOT_MODIFY_MANAGED_IDENTITY": CannotModifyManagedIdentityError,
|
|
3911
|
+
"IDENTITY_ACCESS_DENIED": IdentityAccessDeniedError,
|
|
3912
|
+
"IDENTITY_NOT_FOUND": IdentityNotFoundError,
|
|
3795
3913
|
"EXECUTE_INTERNAL_ERROR": ExecuteInternalErrorError,
|
|
3796
3914
|
"EXECUTE_ACCESS_DENIED": ExecuteAccessDeniedError,
|
|
3797
3915
|
"LIST_RUNS_FAILED": ListRunsFailedError,
|
|
@@ -3806,18 +3924,30 @@ const FREESTYLE_ERROR_CODE_MAP = {
|
|
|
3806
3924
|
"NETWORK_PERMISSIONS_FAILED": NetworkPermissionsFailedError,
|
|
3807
3925
|
"LOGGING_FAILED": LoggingFailedError,
|
|
3808
3926
|
"RUN_NOT_FOUND": RunNotFoundError,
|
|
3809
|
-
"
|
|
3810
|
-
"
|
|
3811
|
-
"
|
|
3812
|
-
"
|
|
3813
|
-
"
|
|
3814
|
-
"
|
|
3815
|
-
"
|
|
3816
|
-
"
|
|
3817
|
-
"
|
|
3818
|
-
"
|
|
3819
|
-
"
|
|
3820
|
-
"
|
|
3927
|
+
"LIMIT_EXCEEDED": LimitExceededError,
|
|
3928
|
+
"FAILED_TO_PROVISION_CERTIFICATE": FailedToProvisionCertificateError,
|
|
3929
|
+
"FAILED_TO_INSERT_DOMAIN_MAPPING": FailedToInsertDomainMappingError,
|
|
3930
|
+
"PERMISSION_DENIED": PermissionDeniedError,
|
|
3931
|
+
"FAILED_TO_CHECK_PERMISSIONS": FailedToCheckPermissionsError,
|
|
3932
|
+
"FAILED_TO_LIST_DOMAINS": FailedToListDomainsError,
|
|
3933
|
+
"FAILED_TO_LIST_VERIFICATIONS": FailedToListVerificationsError,
|
|
3934
|
+
"FAILED_TO_VERIFY_DOMAIN": FailedToVerifyDomainError,
|
|
3935
|
+
"VERIFICATION_FAILED": VerificationFailedError,
|
|
3936
|
+
"FAILED_TO_DELETE_VERIFICATION": FailedToDeleteVerificationError,
|
|
3937
|
+
"VERIFICATION_NOT_FOUND": VerificationNotFoundError,
|
|
3938
|
+
"FAILED_TO_CREATE_VERIFICATION_CODE": FailedToCreateVerificationCodeError,
|
|
3939
|
+
"INVALID_DOMAIN": InvalidDomainError,
|
|
3940
|
+
"CLOUDSTATE_INTERNAL_ERROR": CloudstateInternalErrorError,
|
|
3941
|
+
"CLOUDSTATE_DATABASE_ERROR": CloudstateDatabaseErrorError,
|
|
3942
|
+
"CLOUDSTATE_ACCESS_DENIED": CloudstateAccessDeniedError,
|
|
3943
|
+
"RESTORE_FAILED": RestoreFailedError,
|
|
3944
|
+
"CREATE_BACKUP_FAILED": CreateBackupFailedError,
|
|
3945
|
+
"BACKUP_FAILED": BackupFailedError,
|
|
3946
|
+
"DEPLOYMENT_FAILED": DeploymentFailedError,
|
|
3947
|
+
"INVALID_DEPLOYMENT_REQUEST": InvalidDeploymentRequestError,
|
|
3948
|
+
"PROJECT_NOT_FOUND": ProjectNotFoundError,
|
|
3949
|
+
"GIT_REPO_LIMIT_EXCEEDED": GitRepoLimitExceededError,
|
|
3950
|
+
"EMPTY_TAG": EmptyTagError
|
|
3821
3951
|
};
|
|
3822
3952
|
|
|
3823
3953
|
var errors = /*#__PURE__*/Object.freeze({
|
|
@@ -3825,6 +3955,7 @@ var errors = /*#__PURE__*/Object.freeze({
|
|
|
3825
3955
|
AccessDeniedError: AccessDeniedError,
|
|
3826
3956
|
ActiveTransactionErrorError: ActiveTransactionErrorError,
|
|
3827
3957
|
AfterArrayContainsEmptyError: AfterArrayContainsEmptyError,
|
|
3958
|
+
AlreadyInProgressError: AlreadyInProgressError,
|
|
3828
3959
|
AmbiguousError: AmbiguousError,
|
|
3829
3960
|
BackupFailedError: BackupFailedError,
|
|
3830
3961
|
BadHeaderError: BadHeaderError,
|
|
@@ -3912,6 +4043,7 @@ var errors = /*#__PURE__*/Object.freeze({
|
|
|
3912
4043
|
FailedToInsertOwnershipError: FailedToInsertOwnershipError,
|
|
3913
4044
|
FailedToListDomainsError: FailedToListDomainsError,
|
|
3914
4045
|
FailedToListVerificationsError: FailedToListVerificationsError,
|
|
4046
|
+
FailedToPreRegisterError: FailedToPreRegisterError,
|
|
3915
4047
|
FailedToProvisionCertificateError: FailedToProvisionCertificateError,
|
|
3916
4048
|
FailedToProvisionCertificateForMappingError: FailedToProvisionCertificateForMappingError,
|
|
3917
4049
|
FailedToSpawnUffdError: FailedToSpawnUffdError,
|
|
@@ -3974,6 +4106,7 @@ var errors = /*#__PURE__*/Object.freeze({
|
|
|
3974
4106
|
InvalidSignatureError: InvalidSignatureError,
|
|
3975
4107
|
InvalidSnapshotIdError: InvalidSnapshotIdError,
|
|
3976
4108
|
InvalidVmIdError: InvalidVmIdError,
|
|
4109
|
+
JobNotFoundError: JobNotFoundError,
|
|
3977
4110
|
KernelPanicError: KernelPanicError,
|
|
3978
4111
|
LimitExceededError: LimitExceededError,
|
|
3979
4112
|
ListIdentitiesFailedError: ListIdentitiesFailedError,
|
|
@@ -3988,6 +4121,7 @@ var errors = /*#__PURE__*/Object.freeze({
|
|
|
3988
4121
|
MaxUsesExceededError: MaxUsesExceededError,
|
|
3989
4122
|
MemOverPlanLimitError: MemOverPlanLimitError,
|
|
3990
4123
|
MemSizeTooLargeError: MemSizeTooLargeError,
|
|
4124
|
+
MemoryStorageQuotaExceededError: MemoryStorageQuotaExceededError,
|
|
3991
4125
|
MetadataWriteFailedError: MetadataWriteFailedError,
|
|
3992
4126
|
NetworkPermissionsFailedError: NetworkPermissionsFailedError,
|
|
3993
4127
|
NoDefaultBranchError: NoDefaultBranchError,
|
|
@@ -4013,9 +4147,11 @@ var errors = /*#__PURE__*/Object.freeze({
|
|
|
4013
4147
|
PermissionErrorError: PermissionErrorError,
|
|
4014
4148
|
PermissionNotFoundError: PermissionNotFoundError,
|
|
4015
4149
|
PersistentVmsNotAllowedError: PersistentVmsNotAllowedError,
|
|
4150
|
+
PreassignedVmIdCountMismatchError: PreassignedVmIdCountMismatchError,
|
|
4016
4151
|
ProjectNotFoundError: ProjectNotFoundError,
|
|
4017
4152
|
RecordOwnershipErrorError: RecordOwnershipErrorError,
|
|
4018
4153
|
ReferenceNotFoundError: ReferenceNotFoundError,
|
|
4154
|
+
RepairAlreadyInProgressError: RepairAlreadyInProgressError,
|
|
4019
4155
|
RepoAlreadyExistsError: RepoAlreadyExistsError,
|
|
4020
4156
|
RepoNotFoundError: RepoNotFoundError,
|
|
4021
4157
|
RepositoryAccessDeniedError: RepositoryAccessDeniedError,
|
|
@@ -4037,6 +4173,7 @@ var errors = /*#__PURE__*/Object.freeze({
|
|
|
4037
4173
|
RootfsCopyErrorError: RootfsCopyErrorError,
|
|
4038
4174
|
RootfsOverPlanLimitError: RootfsOverPlanLimitError,
|
|
4039
4175
|
RootfsSizeTooLargeError: RootfsSizeTooLargeError,
|
|
4176
|
+
RootfsStorageQuotaExceededError: RootfsStorageQuotaExceededError,
|
|
4040
4177
|
RunNotFoundError: RunNotFoundError,
|
|
4041
4178
|
RuntimeErrorError: RuntimeErrorError,
|
|
4042
4179
|
ScheduleNotFoundError: ScheduleNotFoundError,
|
|
@@ -4064,6 +4201,7 @@ var errors = /*#__PURE__*/Object.freeze({
|
|
|
4064
4201
|
SourceImportConflictError: SourceImportConflictError,
|
|
4065
4202
|
SourceNotFoundError: SourceNotFoundError,
|
|
4066
4203
|
SourceUnauthorizedError: SourceUnauthorizedError,
|
|
4204
|
+
StartingHandleInstanceIdMismatchError: StartingHandleInstanceIdMismatchError,
|
|
4067
4205
|
SubvolumeCreationFailedError: SubvolumeCreationFailedError,
|
|
4068
4206
|
SuspendFailedAndStopFailedError: SuspendFailedAndStopFailedError,
|
|
4069
4207
|
SuspendFailedAndStoppedError: SuspendFailedAndStoppedError,
|
|
@@ -4072,6 +4210,7 @@ var errors = /*#__PURE__*/Object.freeze({
|
|
|
4072
4210
|
TagNotFoundError: TagNotFoundError,
|
|
4073
4211
|
TimeoutLimitExceededError: TimeoutLimitExceededError,
|
|
4074
4212
|
TokenErrorError: TokenErrorError,
|
|
4213
|
+
TooManyConcurrentRepairsError: TooManyConcurrentRepairsError,
|
|
4075
4214
|
TotalVmLimitExceededError: TotalVmLimitExceededError,
|
|
4076
4215
|
TreeNotFoundError: TreeNotFoundError,
|
|
4077
4216
|
TriggerErrorError: TriggerErrorError,
|
|
@@ -4079,6 +4218,7 @@ var errors = /*#__PURE__*/Object.freeze({
|
|
|
4079
4218
|
UnauthorizedError: UnauthorizedError,
|
|
4080
4219
|
UnauthorizedErrorError: UnauthorizedErrorError,
|
|
4081
4220
|
UnavailableError: UnavailableError,
|
|
4221
|
+
UnsupportedOsError: UnsupportedOsError,
|
|
4082
4222
|
UnsupportedTransferError: UnsupportedTransferError,
|
|
4083
4223
|
UpdateDefaultBranchFailedError: UpdateDefaultBranchFailedError,
|
|
4084
4224
|
UpdatePermissionFailedError: UpdatePermissionFailedError,
|
|
@@ -4199,6 +4339,7 @@ class ApiClient {
|
|
|
4199
4339
|
return response.json();
|
|
4200
4340
|
}
|
|
4201
4341
|
async fetch(url, options) {
|
|
4342
|
+
const resolvedUrl = /^[a-zA-Z][a-zA-Zd+-.]*:/.test(url) ? url : this.buildUrl(url);
|
|
4202
4343
|
const headers = this.getDefaultHeaders();
|
|
4203
4344
|
const finalOptions = {
|
|
4204
4345
|
...options,
|
|
@@ -4207,7 +4348,7 @@ class ApiClient {
|
|
|
4207
4348
|
...options?.headers || {}
|
|
4208
4349
|
}
|
|
4209
4350
|
};
|
|
4210
|
-
return this.fetchFn(
|
|
4351
|
+
return this.fetchFn(resolvedUrl, finalOptions);
|
|
4211
4352
|
}
|
|
4212
4353
|
resolveUrl(path, params, query) {
|
|
4213
4354
|
return this.buildUrl(path, params, query);
|
|
@@ -5583,9 +5724,9 @@ class Deployment {
|
|
|
5583
5724
|
/**
|
|
5584
5725
|
* Get logs for this deployment.
|
|
5585
5726
|
*/
|
|
5586
|
-
async getLogs(options) {
|
|
5727
|
+
async getLogs(options = {}) {
|
|
5587
5728
|
return this.apiClient.get("/observability/v1/logs", {
|
|
5588
|
-
query: { deploymentId: this.deploymentId
|
|
5729
|
+
query: { ...options, deploymentId: this.deploymentId }
|
|
5589
5730
|
});
|
|
5590
5731
|
}
|
|
5591
5732
|
/**
|
|
@@ -5793,6 +5934,17 @@ class RunsNamespace {
|
|
|
5793
5934
|
});
|
|
5794
5935
|
return response;
|
|
5795
5936
|
}
|
|
5937
|
+
/**
|
|
5938
|
+
* Get observability logs for a script run.
|
|
5939
|
+
*/
|
|
5940
|
+
async getLogs({
|
|
5941
|
+
runId,
|
|
5942
|
+
...options
|
|
5943
|
+
}) {
|
|
5944
|
+
return this.apiClient.get("/observability/v1/logs", {
|
|
5945
|
+
query: { ...options, runId }
|
|
5946
|
+
});
|
|
5947
|
+
}
|
|
5796
5948
|
/**
|
|
5797
5949
|
* List execution runs.
|
|
5798
5950
|
*/
|
|
@@ -6657,6 +6809,85 @@ function composeVmSpecs(specs) {
|
|
|
6657
6809
|
return result;
|
|
6658
6810
|
}
|
|
6659
6811
|
|
|
6812
|
+
class Build {
|
|
6813
|
+
/** @internal */
|
|
6814
|
+
_apiClient;
|
|
6815
|
+
buildId;
|
|
6816
|
+
/** @internal */
|
|
6817
|
+
constructor({
|
|
6818
|
+
buildId,
|
|
6819
|
+
apiClient
|
|
6820
|
+
}) {
|
|
6821
|
+
this.buildId = buildId;
|
|
6822
|
+
this._apiClient = apiClient;
|
|
6823
|
+
}
|
|
6824
|
+
/** Fetch the latest build record. */
|
|
6825
|
+
async get() {
|
|
6826
|
+
const url = this._apiClient.resolveUrl(
|
|
6827
|
+
"/v1/vms/builds/{build_id}",
|
|
6828
|
+
{ build_id: this.buildId }
|
|
6829
|
+
);
|
|
6830
|
+
const res = await this._apiClient.fetch(url, { method: "GET" });
|
|
6831
|
+
if (!res.ok) {
|
|
6832
|
+
throw new Error(
|
|
6833
|
+
`GET /v1/vms/builds/${this.buildId} failed: ${res.status} ${res.statusText}`
|
|
6834
|
+
);
|
|
6835
|
+
}
|
|
6836
|
+
return await res.json();
|
|
6837
|
+
}
|
|
6838
|
+
/** List the phases that have run so far for this build. */
|
|
6839
|
+
async phases() {
|
|
6840
|
+
const url = this._apiClient.resolveUrl(
|
|
6841
|
+
"/v1/vms/builds/{build_id}/phases",
|
|
6842
|
+
{ build_id: this.buildId }
|
|
6843
|
+
);
|
|
6844
|
+
const res = await this._apiClient.fetch(url, { method: "GET" });
|
|
6845
|
+
if (!res.ok) {
|
|
6846
|
+
throw new Error(
|
|
6847
|
+
`GET /v1/vms/builds/${this.buildId}/phases failed: ${res.status} ${res.statusText}`
|
|
6848
|
+
);
|
|
6849
|
+
}
|
|
6850
|
+
const body = await res.json();
|
|
6851
|
+
return body.phases;
|
|
6852
|
+
}
|
|
6853
|
+
/**
|
|
6854
|
+
* Poll until the build reaches a terminal state.
|
|
6855
|
+
* @param opts.intervalMs poll interval (default 2000)
|
|
6856
|
+
* @param opts.timeoutMs absolute timeout (default 10 minutes)
|
|
6857
|
+
*/
|
|
6858
|
+
async wait(opts = {}) {
|
|
6859
|
+
const interval = opts.intervalMs ?? 2e3;
|
|
6860
|
+
const deadline = Date.now() + (opts.timeoutMs ?? 10 * 6e4);
|
|
6861
|
+
while (true) {
|
|
6862
|
+
const record = await this.get();
|
|
6863
|
+
if (record.state === "succeeded" || record.state === "failed") {
|
|
6864
|
+
return record;
|
|
6865
|
+
}
|
|
6866
|
+
if (Date.now() > deadline) {
|
|
6867
|
+
throw new Error(
|
|
6868
|
+
`Build ${this.buildId} did not finish before timeout (state=${record.state})`
|
|
6869
|
+
);
|
|
6870
|
+
}
|
|
6871
|
+
await new Promise((r) => setTimeout(r, interval));
|
|
6872
|
+
}
|
|
6873
|
+
}
|
|
6874
|
+
/**
|
|
6875
|
+
* Find the phase whose snapshot is the failed/debug snapshot, if the build
|
|
6876
|
+
* has failed. Returns the phase + its snapshotId, or null when the build
|
|
6877
|
+
* either succeeded or has no failed-state snapshot pinned to a phase.
|
|
6878
|
+
*/
|
|
6879
|
+
async failedPhase() {
|
|
6880
|
+
const phases = await this.phases();
|
|
6881
|
+
for (let i = phases.length - 1; i >= 0; i--) {
|
|
6882
|
+
const p = phases[i];
|
|
6883
|
+
if (p?.snapshotId) {
|
|
6884
|
+
return p;
|
|
6885
|
+
}
|
|
6886
|
+
}
|
|
6887
|
+
return null;
|
|
6888
|
+
}
|
|
6889
|
+
}
|
|
6890
|
+
|
|
6660
6891
|
const DEFAULT_CONFIGURE_BASE_IMAGE = "FROM debian:trixie-slim";
|
|
6661
6892
|
const RUN_COMMANDS_SYSTEMD_SERVICE_PREFIX = "freestyle-run-command";
|
|
6662
6893
|
const WAIT_FOR_SYSTEMD_SERVICE_PREFIX = "freestyle-wait-for";
|
|
@@ -6674,34 +6905,50 @@ function extractBackgroundRequestId(response, body) {
|
|
|
6674
6905
|
async function parseJsonResponse(response) {
|
|
6675
6906
|
return await response.json();
|
|
6676
6907
|
}
|
|
6677
|
-
async function
|
|
6678
|
-
|
|
6679
|
-
if (!responseText) {
|
|
6680
|
-
return fallbackMessage;
|
|
6681
|
-
}
|
|
6908
|
+
async function emitBackgroundLogs(apiClient, requestId, logger, seenLogs) {
|
|
6909
|
+
let response;
|
|
6682
6910
|
try {
|
|
6683
|
-
|
|
6684
|
-
|
|
6685
|
-
|
|
6686
|
-
|
|
6911
|
+
response = await apiClient.fetch(
|
|
6912
|
+
apiClient.resolveUrl("/observability/v1/logs", void 0, { requestId }),
|
|
6913
|
+
{ method: "GET" }
|
|
6914
|
+
);
|
|
6915
|
+
} catch (error) {
|
|
6916
|
+
console.warn(
|
|
6917
|
+
`[freestyle] background log fetch failed for request ${requestId}:`,
|
|
6918
|
+
error
|
|
6919
|
+
);
|
|
6920
|
+
return;
|
|
6687
6921
|
}
|
|
6688
|
-
}
|
|
6689
|
-
async function emitBackgroundLogs(apiClient, requestId, logger, seenLogs) {
|
|
6690
|
-
const response = await apiClient.fetch(
|
|
6691
|
-
apiClient.resolveUrl("/observability/v1/logs", void 0, { requestId }),
|
|
6692
|
-
{ method: "GET" }
|
|
6693
|
-
);
|
|
6694
6922
|
if (!response.ok) {
|
|
6923
|
+
console.warn(
|
|
6924
|
+
`[freestyle] background log fetch returned ${response.status} for request ${requestId}`
|
|
6925
|
+
);
|
|
6926
|
+
return;
|
|
6927
|
+
}
|
|
6928
|
+
let payload;
|
|
6929
|
+
try {
|
|
6930
|
+
payload = await response.json();
|
|
6931
|
+
} catch (error) {
|
|
6932
|
+
console.warn(
|
|
6933
|
+
`[freestyle] background log payload parse failed for request ${requestId}:`,
|
|
6934
|
+
error
|
|
6935
|
+
);
|
|
6695
6936
|
return;
|
|
6696
6937
|
}
|
|
6697
|
-
const payload = await response.json();
|
|
6698
6938
|
for (const entry of payload.logs ?? []) {
|
|
6699
6939
|
const key = `${entry.timestamp} ${entry.message}`;
|
|
6700
6940
|
if (seenLogs.has(key)) {
|
|
6701
6941
|
continue;
|
|
6702
6942
|
}
|
|
6703
6943
|
seenLogs.add(key);
|
|
6704
|
-
|
|
6944
|
+
try {
|
|
6945
|
+
logger(`[${entry.timestamp}] ${entry.message}`);
|
|
6946
|
+
} catch (error) {
|
|
6947
|
+
console.warn(
|
|
6948
|
+
`[freestyle] background logger callback threw for request ${requestId}:`,
|
|
6949
|
+
error
|
|
6950
|
+
);
|
|
6951
|
+
}
|
|
6705
6952
|
}
|
|
6706
6953
|
}
|
|
6707
6954
|
async function waitForBackgroundRequest(apiClient, requestId, logger) {
|
|
@@ -6711,29 +6958,64 @@ async function waitForBackgroundRequest(apiClient, requestId, logger) {
|
|
|
6711
6958
|
);
|
|
6712
6959
|
while (true) {
|
|
6713
6960
|
await emitBackgroundLogs(apiClient, requestId, logger, seenLogs);
|
|
6714
|
-
|
|
6715
|
-
|
|
6961
|
+
let response;
|
|
6962
|
+
try {
|
|
6963
|
+
response = await apiClient.fetch(resultUrl, { method: "GET" });
|
|
6964
|
+
} catch {
|
|
6716
6965
|
await delay(DEFAULT_BACKGROUND_POLL_INTERVAL_MS);
|
|
6717
6966
|
continue;
|
|
6718
6967
|
}
|
|
6719
6968
|
if (!response.ok) {
|
|
6720
|
-
const
|
|
6721
|
-
|
|
6722
|
-
|
|
6723
|
-
|
|
6724
|
-
|
|
6969
|
+
const responseText = await response.text().catch(() => "");
|
|
6970
|
+
let parsedBody;
|
|
6971
|
+
try {
|
|
6972
|
+
parsedBody = JSON.parse(responseText);
|
|
6973
|
+
} catch {
|
|
6974
|
+
await delay(DEFAULT_BACKGROUND_POLL_INTERVAL_MS);
|
|
6975
|
+
continue;
|
|
6976
|
+
}
|
|
6977
|
+
const hasErrorCode = typeof parsedBody === "object" && parsedBody !== null && typeof parsedBody.code === "string";
|
|
6978
|
+
if (!hasErrorCode) {
|
|
6979
|
+
await delay(DEFAULT_BACKGROUND_POLL_INTERVAL_MS);
|
|
6980
|
+
continue;
|
|
6981
|
+
}
|
|
6982
|
+
try {
|
|
6983
|
+
throw errorFromJSON(parsedBody);
|
|
6984
|
+
} catch (error) {
|
|
6985
|
+
if (error instanceof Error) {
|
|
6986
|
+
throw error;
|
|
6987
|
+
}
|
|
6988
|
+
throw new Error(responseText);
|
|
6989
|
+
}
|
|
6990
|
+
}
|
|
6991
|
+
if (response.status === 202) {
|
|
6992
|
+
await delay(DEFAULT_BACKGROUND_POLL_INTERVAL_MS);
|
|
6993
|
+
continue;
|
|
6725
6994
|
}
|
|
6726
6995
|
return parseJsonResponse(response);
|
|
6727
6996
|
}
|
|
6728
6997
|
}
|
|
6729
6998
|
async function postWithBackgroundLogger(apiClient, path, options, logger) {
|
|
6730
|
-
const
|
|
6999
|
+
const postOptions = {
|
|
6731
7000
|
...options,
|
|
6732
7001
|
headers: logger ? {
|
|
6733
7002
|
...options.headers ?? {},
|
|
6734
7003
|
[BACKGROUND_AFTER_SECS_HEADER]: String(DEFAULT_BACKGROUND_AFTER_SECS)
|
|
6735
7004
|
} : options.headers
|
|
6736
|
-
}
|
|
7005
|
+
};
|
|
7006
|
+
let response;
|
|
7007
|
+
while (true) {
|
|
7008
|
+
try {
|
|
7009
|
+
response = await apiClient.postRaw(path, postOptions);
|
|
7010
|
+
break;
|
|
7011
|
+
} catch (error) {
|
|
7012
|
+
console.warn(
|
|
7013
|
+
`[freestyle] POST ${path} threw, retrying:`,
|
|
7014
|
+
error
|
|
7015
|
+
);
|
|
7016
|
+
await delay(DEFAULT_BACKGROUND_POLL_INTERVAL_MS);
|
|
7017
|
+
}
|
|
7018
|
+
}
|
|
6737
7019
|
if (response.status !== 202 || !logger) {
|
|
6738
7020
|
return parseJsonResponse(response);
|
|
6739
7021
|
}
|
|
@@ -6985,6 +7267,32 @@ class Vm {
|
|
|
6985
7267
|
params: { vm_id: this.vmId }
|
|
6986
7268
|
});
|
|
6987
7269
|
}
|
|
7270
|
+
/**
|
|
7271
|
+
* Get observability logs for this VM.
|
|
7272
|
+
*/
|
|
7273
|
+
async getLogs(options = {}) {
|
|
7274
|
+
return this._freestyle.observability.getLogs({
|
|
7275
|
+
...options,
|
|
7276
|
+
vmId: this.vmId
|
|
7277
|
+
});
|
|
7278
|
+
}
|
|
7279
|
+
/**
|
|
7280
|
+
* Fetch the build record that produced this VM. Returns a `Build` handle —
|
|
7281
|
+
* call `.get()` for the record, `.phases()` for the per-phase breakdown.
|
|
7282
|
+
*/
|
|
7283
|
+
async getBuild() {
|
|
7284
|
+
const url = this.apiClient.resolveUrl("/v1/vms/{vm_id}/build", {
|
|
7285
|
+
vm_id: this.vmId
|
|
7286
|
+
});
|
|
7287
|
+
const res = await this.apiClient.fetch(url, { method: "GET" });
|
|
7288
|
+
if (!res.ok) {
|
|
7289
|
+
throw new Error(
|
|
7290
|
+
`GET /v1/vms/${this.vmId}/build failed: ${res.status} ${res.statusText}`
|
|
7291
|
+
);
|
|
7292
|
+
}
|
|
7293
|
+
const record = await res.json();
|
|
7294
|
+
return new Build({ buildId: record.buildId, apiClient: this.apiClient });
|
|
7295
|
+
}
|
|
6988
7296
|
user({ username }) {
|
|
6989
7297
|
let vm = new Vm({ vmId: this.vmId, freestyle: this._freestyle });
|
|
6990
7298
|
vm._linux_username = username;
|
|
@@ -7424,10 +7732,22 @@ class VmSpec {
|
|
|
7424
7732
|
}
|
|
7425
7733
|
systemdService(service) {
|
|
7426
7734
|
const existingSystemd = this.raw.systemd ?? {};
|
|
7427
|
-
const services = existingSystemd.services ?? [];
|
|
7735
|
+
const services = [...existingSystemd.services ?? []];
|
|
7736
|
+
const { lastGeneratedServiceName } = getGeneratedServiceState(
|
|
7737
|
+
services,
|
|
7738
|
+
RUN_COMMANDS_SYSTEMD_SERVICE_PREFIX
|
|
7739
|
+
);
|
|
7740
|
+
const normalizedService = {
|
|
7741
|
+
...service,
|
|
7742
|
+
after: appendServiceDependency(service.after, lastGeneratedServiceName),
|
|
7743
|
+
requires: appendServiceDependency(
|
|
7744
|
+
service.requires,
|
|
7745
|
+
lastGeneratedServiceName
|
|
7746
|
+
)
|
|
7747
|
+
};
|
|
7428
7748
|
this.raw.systemd = {
|
|
7429
7749
|
...existingSystemd,
|
|
7430
|
-
services: [...services,
|
|
7750
|
+
services: [...services, normalizedService]
|
|
7431
7751
|
};
|
|
7432
7752
|
return this;
|
|
7433
7753
|
}
|
|
@@ -8009,6 +8329,115 @@ class VmSnapshotsNamespace {
|
|
|
8009
8329
|
}
|
|
8010
8330
|
return await response.json();
|
|
8011
8331
|
}
|
|
8332
|
+
/**
|
|
8333
|
+
* List snapshots. By default omits deleted, includes failed/building.
|
|
8334
|
+
*/
|
|
8335
|
+
async list(opts = {}) {
|
|
8336
|
+
const query = {};
|
|
8337
|
+
if (opts.includeDeleted != null)
|
|
8338
|
+
query.includeDeleted = String(opts.includeDeleted);
|
|
8339
|
+
if (opts.includeFailed != null)
|
|
8340
|
+
query.includeFailed = String(opts.includeFailed);
|
|
8341
|
+
if (opts.includeBuilding != null)
|
|
8342
|
+
query.includeBuilding = String(opts.includeBuilding);
|
|
8343
|
+
if (opts.includeCancelled != null)
|
|
8344
|
+
query.includeCancelled = String(opts.includeCancelled);
|
|
8345
|
+
if (opts.includeLost != null)
|
|
8346
|
+
query.includeLost = String(opts.includeLost);
|
|
8347
|
+
const url = this.apiClient.resolveUrl("/v1/vms/snapshots", void 0, query);
|
|
8348
|
+
const res = await this.apiClient.fetch(url, { method: "GET" });
|
|
8349
|
+
if (!res.ok) {
|
|
8350
|
+
throw new Error(
|
|
8351
|
+
`GET /v1/vms/snapshots failed: ${res.status} ${res.statusText}`
|
|
8352
|
+
);
|
|
8353
|
+
}
|
|
8354
|
+
return await res.json();
|
|
8355
|
+
}
|
|
8356
|
+
/** Construct a `Snapshot` handle from a known snapshot ID. */
|
|
8357
|
+
ref({ snapshotId }) {
|
|
8358
|
+
return new Snapshot({ snapshotId, apiClient: this.apiClient });
|
|
8359
|
+
}
|
|
8360
|
+
/** Convenience: fetch the snapshot record. Equivalent to `ref(...).get()`. */
|
|
8361
|
+
async get({ snapshotId }) {
|
|
8362
|
+
return this.ref({ snapshotId }).get();
|
|
8363
|
+
}
|
|
8364
|
+
}
|
|
8365
|
+
class Snapshot {
|
|
8366
|
+
/** @internal */
|
|
8367
|
+
_apiClient;
|
|
8368
|
+
snapshotId;
|
|
8369
|
+
/** @internal */
|
|
8370
|
+
constructor({
|
|
8371
|
+
snapshotId,
|
|
8372
|
+
apiClient
|
|
8373
|
+
}) {
|
|
8374
|
+
this.snapshotId = snapshotId;
|
|
8375
|
+
this._apiClient = apiClient;
|
|
8376
|
+
}
|
|
8377
|
+
/** Fetch the latest snapshot record. */
|
|
8378
|
+
async get() {
|
|
8379
|
+
const url = this._apiClient.resolveUrl(
|
|
8380
|
+
"/v1/vms/snapshots/{snapshot_id}",
|
|
8381
|
+
{ snapshot_id: this.snapshotId }
|
|
8382
|
+
);
|
|
8383
|
+
const res = await this._apiClient.fetch(url, { method: "GET" });
|
|
8384
|
+
if (!res.ok) {
|
|
8385
|
+
throw new Error(
|
|
8386
|
+
`GET /v1/vms/snapshots/${this.snapshotId} failed: ${res.status} ${res.statusText}`
|
|
8387
|
+
);
|
|
8388
|
+
}
|
|
8389
|
+
return await res.json();
|
|
8390
|
+
}
|
|
8391
|
+
/** Rename the snapshot. */
|
|
8392
|
+
async update({ name }) {
|
|
8393
|
+
const url = this._apiClient.resolveUrl(
|
|
8394
|
+
"/v1/vms/snapshots/{snapshot_id}",
|
|
8395
|
+
{ snapshot_id: this.snapshotId }
|
|
8396
|
+
);
|
|
8397
|
+
const res = await this._apiClient.fetch(url, {
|
|
8398
|
+
method: "PATCH",
|
|
8399
|
+
body: JSON.stringify({ name }),
|
|
8400
|
+
headers: { "Content-Type": "application/json" }
|
|
8401
|
+
});
|
|
8402
|
+
if (!res.ok) {
|
|
8403
|
+
throw new Error(
|
|
8404
|
+
`PATCH /v1/vms/snapshots/${this.snapshotId} failed: ${res.status} ${res.statusText}`
|
|
8405
|
+
);
|
|
8406
|
+
}
|
|
8407
|
+
}
|
|
8408
|
+
/** Delete the snapshot. */
|
|
8409
|
+
async delete() {
|
|
8410
|
+
const url = this._apiClient.resolveUrl(
|
|
8411
|
+
"/v1/vms/snapshots/{snapshot_id}",
|
|
8412
|
+
{ snapshot_id: this.snapshotId }
|
|
8413
|
+
);
|
|
8414
|
+
const res = await this._apiClient.fetch(url, { method: "DELETE" });
|
|
8415
|
+
if (!res.ok) {
|
|
8416
|
+
const errorBody = await res.json().catch(() => null);
|
|
8417
|
+
if (errorBody?.code) {
|
|
8418
|
+
throw errorFromJSON(errorBody);
|
|
8419
|
+
}
|
|
8420
|
+
throw new Error(
|
|
8421
|
+
`DELETE /v1/vms/snapshots/${this.snapshotId} failed: ${res.status} ${res.statusText}`
|
|
8422
|
+
);
|
|
8423
|
+
}
|
|
8424
|
+
return await res.json();
|
|
8425
|
+
}
|
|
8426
|
+
/**
|
|
8427
|
+
* Fetch the build record that produced this snapshot. Returns a `Build`
|
|
8428
|
+
* handle. Throws if the snapshot has no `buildId` (legacy rows or
|
|
8429
|
+
* snapshots that pre-date the build-tracking feature).
|
|
8430
|
+
*/
|
|
8431
|
+
async getBuild() {
|
|
8432
|
+
const info = await this.get();
|
|
8433
|
+
const buildId = info.buildId;
|
|
8434
|
+
if (!buildId) {
|
|
8435
|
+
throw new Error(
|
|
8436
|
+
`Snapshot ${this.snapshotId} has no associated build (legacy snapshot or build record missing).`
|
|
8437
|
+
);
|
|
8438
|
+
}
|
|
8439
|
+
return new Build({ buildId, apiClient: this._apiClient });
|
|
8440
|
+
}
|
|
8012
8441
|
}
|
|
8013
8442
|
async function processTemplateTree(template) {
|
|
8014
8443
|
if (template.raw.baseImage) {
|
|
@@ -8116,16 +8545,27 @@ class CronNamespace {
|
|
|
8116
8545
|
*/
|
|
8117
8546
|
async schedule({
|
|
8118
8547
|
deploymentId,
|
|
8548
|
+
run,
|
|
8549
|
+
name,
|
|
8119
8550
|
cron,
|
|
8120
8551
|
timezone,
|
|
8552
|
+
retries,
|
|
8121
8553
|
payload,
|
|
8122
8554
|
path
|
|
8123
8555
|
}) {
|
|
8556
|
+
if (!deploymentId && !run || deploymentId && run) {
|
|
8557
|
+
throw new Error(
|
|
8558
|
+
"Exactly one of deploymentId or run must be provided when creating a cron schedule."
|
|
8559
|
+
);
|
|
8560
|
+
}
|
|
8124
8561
|
const response = await this.apiClient.post("/v1/cron/schedules", {
|
|
8125
8562
|
body: {
|
|
8126
8563
|
deploymentId,
|
|
8564
|
+
run,
|
|
8565
|
+
name,
|
|
8127
8566
|
cron,
|
|
8128
8567
|
timezone: timezone ?? "UTC",
|
|
8568
|
+
retries,
|
|
8129
8569
|
payload: payload ?? {},
|
|
8130
8570
|
path
|
|
8131
8571
|
}
|
|
@@ -8163,6 +8603,28 @@ class CronJob {
|
|
|
8163
8603
|
this.#apiClient = apiClient;
|
|
8164
8604
|
this.schedule = schedule;
|
|
8165
8605
|
}
|
|
8606
|
+
/**
|
|
8607
|
+
* Update this cron schedule.
|
|
8608
|
+
*/
|
|
8609
|
+
async update(params) {
|
|
8610
|
+
if (params.deploymentId && params.run) {
|
|
8611
|
+
throw new Error("Only one of deploymentId or run may be provided.");
|
|
8612
|
+
}
|
|
8613
|
+
await this.#apiClient.patch("/v1/cron/schedules/{id}", {
|
|
8614
|
+
params: { id: this.schedule.id },
|
|
8615
|
+
body: {
|
|
8616
|
+
deploymentId: params.deploymentId,
|
|
8617
|
+
run: params.run,
|
|
8618
|
+
name: params.name,
|
|
8619
|
+
cron: params.cron,
|
|
8620
|
+
timezone: params.timezone,
|
|
8621
|
+
retries: params.retries,
|
|
8622
|
+
payload: params.payload,
|
|
8623
|
+
path: params.path,
|
|
8624
|
+
active: params.active
|
|
8625
|
+
}
|
|
8626
|
+
});
|
|
8627
|
+
}
|
|
8166
8628
|
/**
|
|
8167
8629
|
* Enable this cron schedule.
|
|
8168
8630
|
*/
|
|
@@ -8229,6 +8691,96 @@ class CronJob {
|
|
|
8229
8691
|
}
|
|
8230
8692
|
}
|
|
8231
8693
|
|
|
8694
|
+
const DEFAULT_LOG_STREAM_INTERVAL_MS = 2e3;
|
|
8695
|
+
function logEntryKey(entry) {
|
|
8696
|
+
return [
|
|
8697
|
+
entry.timestamp,
|
|
8698
|
+
entry.resourceType ?? "",
|
|
8699
|
+
entry.resourceId ?? "",
|
|
8700
|
+
entry.instanceId ?? "",
|
|
8701
|
+
entry.vmService ?? "",
|
|
8702
|
+
entry.source ?? "",
|
|
8703
|
+
entry.message
|
|
8704
|
+
].join(" ");
|
|
8705
|
+
}
|
|
8706
|
+
function sortLogsAscending(logs) {
|
|
8707
|
+
return [...logs].sort((left, right) => {
|
|
8708
|
+
const leftTime = Date.parse(left.timestamp);
|
|
8709
|
+
const rightTime = Date.parse(right.timestamp);
|
|
8710
|
+
if (!Number.isNaN(leftTime) && !Number.isNaN(rightTime)) {
|
|
8711
|
+
return leftTime - rightTime;
|
|
8712
|
+
}
|
|
8713
|
+
return left.timestamp.localeCompare(right.timestamp);
|
|
8714
|
+
});
|
|
8715
|
+
}
|
|
8716
|
+
function waitForInterval(ms, signal) {
|
|
8717
|
+
if (signal?.aborted) {
|
|
8718
|
+
return Promise.resolve();
|
|
8719
|
+
}
|
|
8720
|
+
return new Promise((resolve) => {
|
|
8721
|
+
const timeout = setTimeout(resolve, ms);
|
|
8722
|
+
signal?.addEventListener(
|
|
8723
|
+
"abort",
|
|
8724
|
+
() => {
|
|
8725
|
+
clearTimeout(timeout);
|
|
8726
|
+
resolve();
|
|
8727
|
+
},
|
|
8728
|
+
{ once: true }
|
|
8729
|
+
);
|
|
8730
|
+
});
|
|
8731
|
+
}
|
|
8732
|
+
class ObservabilityNamespace {
|
|
8733
|
+
constructor(apiClient) {
|
|
8734
|
+
this.apiClient = apiClient;
|
|
8735
|
+
}
|
|
8736
|
+
async getLogs(options = {}) {
|
|
8737
|
+
return this.apiClient.get("/observability/v1/logs", {
|
|
8738
|
+
query: options
|
|
8739
|
+
});
|
|
8740
|
+
}
|
|
8741
|
+
logs(options = {}) {
|
|
8742
|
+
return this.getLogs(options);
|
|
8743
|
+
}
|
|
8744
|
+
async *streamLogs({
|
|
8745
|
+
intervalMs = DEFAULT_LOG_STREAM_INTERVAL_MS,
|
|
8746
|
+
signal,
|
|
8747
|
+
includeExisting = false,
|
|
8748
|
+
...query
|
|
8749
|
+
} = {}) {
|
|
8750
|
+
const seenLogs = /* @__PURE__ */ new Set();
|
|
8751
|
+
let startTime = query.startTime;
|
|
8752
|
+
if (!includeExisting && !startTime) {
|
|
8753
|
+
startTime = (/* @__PURE__ */ new Date()).toISOString();
|
|
8754
|
+
}
|
|
8755
|
+
while (!signal?.aborted) {
|
|
8756
|
+
const response = await this.getLogs({
|
|
8757
|
+
...query,
|
|
8758
|
+
startTime
|
|
8759
|
+
});
|
|
8760
|
+
if (signal?.aborted) {
|
|
8761
|
+
break;
|
|
8762
|
+
}
|
|
8763
|
+
let newestTimestampMs;
|
|
8764
|
+
for (const entry of sortLogsAscending(response.logs ?? [])) {
|
|
8765
|
+
const key = logEntryKey(entry);
|
|
8766
|
+
if (seenLogs.has(key)) {
|
|
8767
|
+
continue;
|
|
8768
|
+
}
|
|
8769
|
+
seenLogs.add(key);
|
|
8770
|
+
const timestampMs = Date.parse(entry.timestamp);
|
|
8771
|
+
if (!Number.isNaN(timestampMs) && (newestTimestampMs === void 0 || timestampMs > newestTimestampMs)) {
|
|
8772
|
+
newestTimestampMs = timestampMs;
|
|
8773
|
+
}
|
|
8774
|
+
yield entry;
|
|
8775
|
+
}
|
|
8776
|
+
if (newestTimestampMs !== void 0) {
|
|
8777
|
+
startTime = new Date(newestTimestampMs).toISOString();
|
|
8778
|
+
}
|
|
8779
|
+
await waitForInterval(intervalMs, signal);
|
|
8780
|
+
}
|
|
8781
|
+
}
|
|
8782
|
+
}
|
|
8783
|
+
|
|
8232
8784
|
async function readFiles(directory) {
|
|
8233
8785
|
let fs;
|
|
8234
8786
|
let glob;
|
|
@@ -8433,6 +8985,7 @@ class Freestyle {
|
|
|
8433
8985
|
serverless;
|
|
8434
8986
|
vms;
|
|
8435
8987
|
cron;
|
|
8988
|
+
observability;
|
|
8436
8989
|
constructor(options = {}) {
|
|
8437
8990
|
if (!options.baseUrl) {
|
|
8438
8991
|
options.baseUrl = process.env.FREESTYLE_API_URL;
|
|
@@ -8459,6 +9012,7 @@ class Freestyle {
|
|
|
8459
9012
|
this.serverless = new ServerlessNamespace(this._apiClient);
|
|
8460
9013
|
this.vms = new VmsNamespace(this);
|
|
8461
9014
|
this.cron = new CronNamespace(this._apiClient);
|
|
9015
|
+
this.observability = new ObservabilityNamespace(this._apiClient);
|
|
8462
9016
|
}
|
|
8463
9017
|
/**
|
|
8464
9018
|
* Returns information about the currently authenticated user or identity.
|
|
@@ -8500,4 +9054,4 @@ function createLazyFreestyle(options = {}) {
|
|
|
8500
9054
|
}
|
|
8501
9055
|
const freestyle = createLazyFreestyle();
|
|
8502
9056
|
|
|
8503
|
-
export { CronNamespace, Deployment, errors as Errors, FileSystem, Freestyle, GitRepo, Identity, Systemd, SystemdService, Vm, VmBaseImage, VmBuilder, VmService, VmSpec, VmTemplate, VmWith, VmWithInstance, debugCreateRequests, freestyle, readFiles };
|
|
9057
|
+
export { Build, CronNamespace, Deployment, errors as Errors, FileSystem, Freestyle, GitRepo, Identity, ObservabilityNamespace, Snapshot, Systemd, SystemdService, Vm, VmBaseImage, VmBuilder, VmService, VmSpec, VmTemplate, VmWith, VmWithInstance, debugCreateRequests, freestyle, readFiles };
|