UNPKG

31.7 kBJavaScriptView Raw
1"use strict";
2Object.defineProperty(exports, "__esModule", { value: true });
3exports.DocumentNotJsonError = exports.ValueInvalidError = exports.ValueTooDeepError = exports.PathTooDeepError = exports.PathTooBigError = exports.PathInvalidError = exports.PathMismatchError = exports.PathNotFoundError = exports.MutationLostError = exports.DurableWriteReCommitInProgressError = exports.DurableWriteInProgressError = exports.DurabilityAmbiguousError = exports.DurabilityImpossibleError = exports.DurabilityLevelNotAvailableError = exports.ValueNotJsonError = exports.DocumentExistsError = exports.ValueTooLargeError = exports.DocumentNotLockedError = exports.DocumentLockedError = exports.DocumentUnretrievableError = exports.DocumentNotFoundError = exports.IndexExistsError = exports.QuotaLimitedError = exports.RateLimitedError = exports.IndexNotFoundError = exports.ScopeNotFoundError = exports.FeatureNotAvailableError = exports.UnambiguousTimeoutError = exports.AmbiguousTimeoutError = exports.UnsupportedOperationError = exports.DecodingFailureError = exports.EncodingFailureError = exports.CollectionNotFoundError = exports.BucketNotFoundError = exports.CasMismatchError = exports.ParsingFailureError = exports.TemporaryFailureError = exports.AuthenticationFailureError = exports.InternalServerFailureError = exports.ServiceNotAvailableError = exports.InvalidArgumentError = exports.RequestCanceledError = exports.TimeoutError = exports.InvalidDurabilityReplicateToLevel = exports.InvalidDurabilityPersistToLevel = exports.InvalidDurabilityLevel = exports.NeedOpenBucketError = exports.ClusterClosedError = exports.ConnectionClosedError = exports.CouchbaseError = void 0;
4exports.TransactionCommitAmbiguousError = exports.TransactionExpiredError = exports.TransactionFailedError = exports.TransactionOperationFailedError = exports.EventingFunctionPausedError = exports.EventingFunctionDeployedError = exports.EventingFunctionNotBootstrappedError = exports.EventingFunctionIdenticalKeyspaceError = exports.EventingFunctionCompilationFailureError = exports.EventingFunctionNotDeployedError = exports.EventingFunctionNotFoundError = exports.BucketNotFlushableError = exports.UserExistsError = exports.BucketExistsError = exports.GroupNotFoundError = exports.UserNotFoundError = exports.ScopeExistsError = exports.CollectionExistsError = exports.DesignDocumentNotFoundError = exports.ViewNotFoundError = exports.LinkExistsError = exports.LinkNotFoundError = exports.DataverseExistsError = exports.DatasetExistsError = exports.DataverseNotFoundError = exports.DatasetNotFoundError = exports.JobQueueFullError = exports.CompilationFailureError = exports.IndexNotReadyError = exports.DmlFailureError = exports.PreparedStatementFailureError = exports.IndexFailureError = exports.PlanningFailureError = exports.PathExistsError = exports.DeltaInvalidError = exports.NumberTooBigError = void 0;
5require("./errorcontexts");
6/**
7 * A generic base error that all errors inherit. Exposes the cause and
8 * context of the error to enable easier debugging.
9 *
10 * @category Error Handling
11 */
12class CouchbaseError extends Error {
13 constructor(message, cause, context) {
14 super(message);
15 this.name = this.constructor.name;
16 this.stack = undefined;
17 this.cause = cause;
18 this.context = context;
19 }
20}
21exports.CouchbaseError = CouchbaseError;
22/**
23 * Indicates that an operation was performed after a connection was closed.
24 *
25 * @category Error Handling
26 */
27class ConnectionClosedError extends CouchbaseError {
28 constructor() {
29 super('The connection has been closed.');
30 }
31}
32exports.ConnectionClosedError = ConnectionClosedError;
33/**
34 * Indicates that an operation was performed after the cluster object was explicitly
35 * closed by the user.
36 *
37 * @category Error Handling
38 */
39class ClusterClosedError extends CouchbaseError {
40 constructor() {
41 super('The parent cluster object has been closed.');
42 }
43}
44exports.ClusterClosedError = ClusterClosedError;
45/**
46 * Indicates that an cluster-level operation could not be performed as no buckets
47 * were open. This occurs with pre-6.0 clusters which were not able to fetch cluster
48 * topology without knowing the name of a bucket.
49 *
50 * @category Error Handling
51 */
52class NeedOpenBucketError extends CouchbaseError {
53 constructor() {
54 super('You must have one open bucket before you can perform queries.');
55 }
56}
57exports.NeedOpenBucketError = NeedOpenBucketError;
58/**
59 * Indicates that the specific durability level was invalid.
60 *
61 * @category Error Handling
62 */
63class InvalidDurabilityLevel extends CouchbaseError {
64 constructor() {
65 super('An invalid durability level was specified.');
66 }
67}
68exports.InvalidDurabilityLevel = InvalidDurabilityLevel;
69/**
70 * Indicates that the specific durabilityPersistTo level was invalid.
71 *
72 * @category Error Handling
73 */
74class InvalidDurabilityPersistToLevel extends CouchbaseError {
75 constructor() {
76 super('An invalid durability PersistTo level was specified.');
77 }
78}
79exports.InvalidDurabilityPersistToLevel = InvalidDurabilityPersistToLevel;
80/**
81 * Indicates that the specific durabilityReplicateTo level was invalid.
82 *
83 * @category Error Handling
84 */
85class InvalidDurabilityReplicateToLevel extends CouchbaseError {
86 constructor() {
87 super('An invalid durability ReplicateTo level was specified.');
88 }
89}
90exports.InvalidDurabilityReplicateToLevel = InvalidDurabilityReplicateToLevel;
91/**
92 * Indicates that the operation timed out.
93 *
94 * @category Error Handling
95 */
96class TimeoutError extends CouchbaseError {
97 constructor(cause, context) {
98 super('timeout', cause, context);
99 }
100}
101exports.TimeoutError = TimeoutError;
102/**
103 * Indicates that the request was explicitly cancelled.
104 *
105 * @category Error Handling
106 */
107class RequestCanceledError extends CouchbaseError {
108 constructor(cause, context) {
109 super('request canceled', cause, context);
110 }
111}
112exports.RequestCanceledError = RequestCanceledError;
113/**
114 * Indicates that one of the passed arguments was invalid.
115 *
116 * @category Error Handling
117 */
118class InvalidArgumentError extends CouchbaseError {
119 constructor(cause, context) {
120 super('invalid argument', cause, context);
121 }
122}
123exports.InvalidArgumentError = InvalidArgumentError;
124/**
125 * Indicates that the operation requires a service which was not available.
126 * For instance, attempting to perform a query without the query service
127 * being enabled.
128 *
129 * @category Error Handling
130 */
131class ServiceNotAvailableError extends CouchbaseError {
132 constructor(cause, context) {
133 super('service not available', cause, context);
134 }
135}
136exports.ServiceNotAvailableError = ServiceNotAvailableError;
137/**
138 * Indicates some form of internal error occured on the server and the
139 * request could not be completed.
140 *
141 * @category Error Handling
142 */
143class InternalServerFailureError extends CouchbaseError {
144 constructor(cause, context) {
145 super('internal server failure', cause, context);
146 }
147}
148exports.InternalServerFailureError = InternalServerFailureError;
149/**
150 * Indicates that an error occurred authenticating the user to the cluster.
151 *
152 * @category Error Handling
153 */
154class AuthenticationFailureError extends CouchbaseError {
155 constructor(cause, context) {
156 super('authentication failure', cause, context);
157 }
158}
159exports.AuthenticationFailureError = AuthenticationFailureError;
160/**
161 * Indicates that a temporary failure occured, attempting the same operation
162 * in the future may succeed.
163 *
164 * @category Error Handling
165 */
166class TemporaryFailureError extends CouchbaseError {
167 constructor(cause, context) {
168 super('temporary failure', cause, context);
169 }
170}
171exports.TemporaryFailureError = TemporaryFailureError;
172/**
173 * Indicates that a parsing failure occured.
174 *
175 * @category Error Handling
176 */
177class ParsingFailureError extends CouchbaseError {
178 constructor(cause, context) {
179 super('parsing failure', cause, context);
180 }
181}
182exports.ParsingFailureError = ParsingFailureError;
183/**
184 * Indicates that a CAS mismatch occurred. This means that the document
185 * has changed since the last access and should be fetched again before
186 * attempting to make further changes.
187 *
188 * @category Error Handling
189 */
190class CasMismatchError extends CouchbaseError {
191 constructor(cause, context) {
192 super('cas mismatch', cause, context);
193 }
194}
195exports.CasMismatchError = CasMismatchError;
196/**
197 * Indicates that the bucket being referenced does not exist.
198 *
199 * @category Error Handling
200 */
201class BucketNotFoundError extends CouchbaseError {
202 constructor(cause, context) {
203 super('bucket not found', cause, context);
204 }
205}
206exports.BucketNotFoundError = BucketNotFoundError;
207/**
208 * Indicates that the collection being referenced does not exist.
209 *
210 * @category Error Handling
211 */
212class CollectionNotFoundError extends CouchbaseError {
213 constructor(cause, context) {
214 super('collection not found', cause, context);
215 }
216}
217exports.CollectionNotFoundError = CollectionNotFoundError;
218/**
219 * Indicates that there was a failure during encoding.
220 *
221 * @category Error Handling
222 */
223class EncodingFailureError extends CouchbaseError {
224 constructor(cause, context) {
225 super('encoding failure', cause, context);
226 }
227}
228exports.EncodingFailureError = EncodingFailureError;
229/**
230 * Indicates that there was a failure during decoding.
231 *
232 * @category Error Handling
233 */
234class DecodingFailureError extends CouchbaseError {
235 constructor(cause, context) {
236 super('decoding failure', cause, context);
237 }
238}
239exports.DecodingFailureError = DecodingFailureError;
240/**
241 * Indicates that an operation which is not supported was executed.
242 *
243 * @category Error Handling
244 */
245class UnsupportedOperationError extends CouchbaseError {
246 constructor(cause, context) {
247 super('unsupported operation', cause, context);
248 }
249}
250exports.UnsupportedOperationError = UnsupportedOperationError;
251/**
252 * Indicates that an ambiguous timeout has occured. The outcome of the
253 * operation is unknown, and it is possible that it completed after the
254 * generation of this error.
255 *
256 * @category Error Handling
257 */
258class AmbiguousTimeoutError extends TimeoutError {
259 constructor(cause, context) {
260 super(cause, context);
261 this.message = 'ambiguous timeout';
262 }
263}
264exports.AmbiguousTimeoutError = AmbiguousTimeoutError;
265/**
266 * Indicates an unambiguous timeout has occurred. The outcome of the
267 * operation is objective failure and it is known to have not completed.
268 *
269 * @category Error Handling
270 */
271class UnambiguousTimeoutError extends TimeoutError {
272 constructor(cause, context) {
273 super(cause, context);
274 this.message = 'unambiguous timeout';
275 }
276}
277exports.UnambiguousTimeoutError = UnambiguousTimeoutError;
278/**
279 * Indicates a feature which is not available was used. This primarily can
280 * occur if you attempt to perform a query when no query services are enabled
281 * on the cluster, or if a newer server feature which is not available in the
282 * connected server version is used.
283 *
284 * @category Error Handling
285 */
286class FeatureNotAvailableError extends CouchbaseError {
287 constructor(cause, context) {
288 super('feature not available', cause, context);
289 }
290}
291exports.FeatureNotAvailableError = FeatureNotAvailableError;
292/**
293 * Indicates that the referenced scope does not exist.
294 *
295 * @category Error Handling
296 */
297class ScopeNotFoundError extends CouchbaseError {
298 constructor(cause, context) {
299 super('scope not found', cause, context);
300 }
301}
302exports.ScopeNotFoundError = ScopeNotFoundError;
303/**
304 * Indicates that the referenced index does not exist.
305 *
306 * @category Error Handling
307 */
308class IndexNotFoundError extends CouchbaseError {
309 constructor(cause, context) {
310 super('index not found', cause, context);
311 }
312}
313exports.IndexNotFoundError = IndexNotFoundError;
314/**
315 * Indicates that a rate limit was exceeded while attempting to
316 * execute the operation.
317 *
318 * @category Error Handling
319 */
320class RateLimitedError extends CouchbaseError {
321 constructor(cause, context) {
322 super('operation was rate limited', cause, context);
323 }
324}
325exports.RateLimitedError = RateLimitedError;
326/**
327 * Indicates that a quota limit was exceeded while attempting to
328 * execute the operation.
329 *
330 * @category Error Handling
331 */
332class QuotaLimitedError extends CouchbaseError {
333 constructor(cause, context) {
334 super('operation was quota limited', cause, context);
335 }
336}
337exports.QuotaLimitedError = QuotaLimitedError;
338/**
339 * Indicates that the referenced index already existed, but was expected
340 * to not yet exist for the operation.
341 *
342 * @category Error Handling
343 */
344class IndexExistsError extends CouchbaseError {
345 constructor(cause, context) {
346 super('index exists', cause, context);
347 }
348}
349exports.IndexExistsError = IndexExistsError;
350/**
351 * Indicates that the referenced document does not exist.
352 *
353 * @category Error Handling
354 */
355class DocumentNotFoundError extends CouchbaseError {
356 constructor(cause, context) {
357 super('document not found', cause, context);
358 }
359}
360exports.DocumentNotFoundError = DocumentNotFoundError;
361/**
362 * Indicates that the referenced document could not be retrieved.
363 *
364 * @category Error Handling
365 */
366class DocumentUnretrievableError extends CouchbaseError {
367 constructor(cause, context) {
368 super('document unretrievable', cause, context);
369 }
370}
371exports.DocumentUnretrievableError = DocumentUnretrievableError;
372/**
373 * Indicates that the referenced document could not be used as it is currently
374 * locked, likely by another actor in the system.
375 *
376 * @category Error Handling
377 */
378class DocumentLockedError extends CouchbaseError {
379 constructor(cause, context) {
380 super('document locked', cause, context);
381 }
382}
383exports.DocumentLockedError = DocumentLockedError;
384/**
385 * Indicates that the referenced document is not locked. Generally raised when an unlock
386 * operation is performed.
387 *
388 * @category Error Handling
389 */
390class DocumentNotLockedError extends CouchbaseError {
391 constructor(cause, context) {
392 super('document not locked', cause, context);
393 }
394}
395exports.DocumentNotLockedError = DocumentNotLockedError;
396/**
397 * Indicates that a value could not be stored as it was too large.
398 *
399 * @category Error Handling
400 */
401class ValueTooLargeError extends CouchbaseError {
402 constructor(cause, context) {
403 super('value too large', cause, context);
404 }
405}
406exports.ValueTooLargeError = ValueTooLargeError;
407/**
408 * Indicates that the referenced document exists already, but the operation
409 * was not expecting it to exist.
410 *
411 * @category Error Handling
412 */
413class DocumentExistsError extends CouchbaseError {
414 constructor(cause, context) {
415 super('document exists', cause, context);
416 }
417}
418exports.DocumentExistsError = DocumentExistsError;
419/**
420 * Indicates that a JSON operation was attempted with non-JSON data.
421 *
422 * @category Error Handling
423 */
424class ValueNotJsonError extends CouchbaseError {
425 constructor(cause, context) {
426 super('value not json', cause, context);
427 }
428}
429exports.ValueNotJsonError = ValueNotJsonError;
430/**
431 * Indicates that a durability level which is not available was specified.
432 *
433 * @category Error Handling
434 */
435class DurabilityLevelNotAvailableError extends CouchbaseError {
436 constructor(cause, context) {
437 super('durability level not available', cause, context);
438 }
439}
440exports.DurabilityLevelNotAvailableError = DurabilityLevelNotAvailableError;
441/**
442 * Indicates that a durability level which is impossible to achieve was
443 * specified. This can occur when you try to use Majority but there is
444 * less than the majority of nodes available.
445 *
446 * @category Error Handling
447 */
448class DurabilityImpossibleError extends CouchbaseError {
449 constructor(cause, context) {
450 super('durability impossible', cause, context);
451 }
452}
453exports.DurabilityImpossibleError = DurabilityImpossibleError;
454/**
455 * Indicates that the durable operation that was performed has failed
456 * ambiguously and may or may not have completed, or may complete in
457 * the future.
458 *
459 * @category Error Handling
460 */
461class DurabilityAmbiguousError extends CouchbaseError {
462 constructor(cause, context) {
463 super('durability ambiguous', cause, context);
464 }
465}
466exports.DurabilityAmbiguousError = DurabilityAmbiguousError;
467/**
468 * Indicates that a write was failed as an existing durable write against
469 * that key is already in progress.
470 *
471 * @category Error Handling
472 */
473class DurableWriteInProgressError extends CouchbaseError {
474 constructor(cause, context) {
475 super('durable write in progress', cause, context);
476 }
477}
478exports.DurableWriteInProgressError = DurableWriteInProgressError;
479/**
480 * Indicates that a write was failed as the server is currently reconstructing
481 * it's durable data following a failover.
482 *
483 * @category Error Handling
484 */
485class DurableWriteReCommitInProgressError extends CouchbaseError {
486 constructor(cause, context) {
487 super('durable write recommit in progress', cause, context);
488 }
489}
490exports.DurableWriteReCommitInProgressError = DurableWriteReCommitInProgressError;
491/**
492 * Indicates that a mutation was lost.
493 *
494 * @category Error Handling
495 */
496class MutationLostError extends CouchbaseError {
497 constructor(cause, context) {
498 super('mutation lost', cause, context);
499 }
500}
501exports.MutationLostError = MutationLostError;
502/**
503 * Indicates that the reference path was not found.
504 *
505 * @category Error Handling
506 */
507class PathNotFoundError extends CouchbaseError {
508 constructor(cause, context) {
509 super('path not found', cause, context);
510 }
511}
512exports.PathNotFoundError = PathNotFoundError;
513/**
514 * Indicates that the referenced path made incorrect assumptions about
515 * the structure of a document, for instance attempting to access a field
516 * as an object when in fact it is an array.
517 *
518 * @category Error Handling
519 */
520class PathMismatchError extends CouchbaseError {
521 constructor(cause, context) {
522 super('path mismatch', cause, context);
523 }
524}
525exports.PathMismatchError = PathMismatchError;
526/**
527 * Indicates that the referenced path is not valid.
528 *
529 * @category Error Handling
530 */
531class PathInvalidError extends CouchbaseError {
532 constructor(cause, context) {
533 super('path invalid', cause, context);
534 }
535}
536exports.PathInvalidError = PathInvalidError;
537/**
538 * Indicates that the specified path was too large to parse.
539 *
540 * @category Error Handling
541 */
542class PathTooBigError extends CouchbaseError {
543 constructor(cause, context) {
544 super('path too big', cause, context);
545 }
546}
547exports.PathTooBigError = PathTooBigError;
548/**
549 * Indicates that the referenced path was too deep to parse.
550 *
551 * @category Error Handling
552 */
553class PathTooDeepError extends CouchbaseError {
554 constructor(cause, context) {
555 super('path too deep', cause, context);
556 }
557}
558exports.PathTooDeepError = PathTooDeepError;
559/**
560 * Indicates that the document created by the operation would become
561 * too deep to operate on.
562 *
563 * @category Error Handling
564 */
565class ValueTooDeepError extends CouchbaseError {
566 constructor(cause, context) {
567 super('value too deep', cause, context);
568 }
569}
570exports.ValueTooDeepError = ValueTooDeepError;
571/**
572 * Indicates that the value passed is invalid.
573 *
574 * @category Error Handling
575 */
576class ValueInvalidError extends CouchbaseError {
577 constructor(cause, context) {
578 super('value invalid', cause, context);
579 }
580}
581exports.ValueInvalidError = ValueInvalidError;
582/**
583 * Indicates that an operation expecting JSON was performed against a document
584 * which is not JSON.
585 *
586 * @category Error Handling
587 */
588class DocumentNotJsonError extends CouchbaseError {
589 constructor(cause, context) {
590 super('document not json', cause, context);
591 }
592}
593exports.DocumentNotJsonError = DocumentNotJsonError;
594/**
595 * Indicates that a number has grown too large.
596 *
597 * @category Error Handling
598 */
599class NumberTooBigError extends CouchbaseError {
600 constructor(cause, context) {
601 super('number too big', cause, context);
602 }
603}
604exports.NumberTooBigError = NumberTooBigError;
605/**
606 * Indicates that the delta specified is invalid.
607 *
608 * @category Error Handling
609 */
610class DeltaInvalidError extends CouchbaseError {
611 constructor(cause, context) {
612 super('delta invalid', cause, context);
613 }
614}
615exports.DeltaInvalidError = DeltaInvalidError;
616/**
617 * Indicates that the reference path already existed, but the operation
618 * expected that it did not.
619 *
620 * @category Error Handling
621 */
622class PathExistsError extends CouchbaseError {
623 constructor(cause, context) {
624 super('path exists', cause, context);
625 }
626}
627exports.PathExistsError = PathExistsError;
628/**
629 * Indicates that a failure occurred while planning a query.
630 *
631 * @category Error Handling
632 */
633class PlanningFailureError extends CouchbaseError {
634 constructor(cause, context) {
635 super('planning failure', cause, context);
636 }
637}
638exports.PlanningFailureError = PlanningFailureError;
639/**
640 * Indicates that a failure occured while querying an index.
641 *
642 * @category Error Handling
643 */
644class IndexFailureError extends CouchbaseError {
645 constructor(cause, context) {
646 super('index failure', cause, context);
647 }
648}
649exports.IndexFailureError = IndexFailureError;
650/**
651 * Indicates that an error occurred with a prepared statement.
652 *
653 * @category Error Handling
654 */
655class PreparedStatementFailureError extends CouchbaseError {
656 constructor(cause, context) {
657 super('prepared statement failure', cause, context);
658 }
659}
660exports.PreparedStatementFailureError = PreparedStatementFailureError;
661/**
662 * Indicates that a generic DML error occurred with a query.
663 *
664 * @category Error Handling
665 */
666class DmlFailureError extends CouchbaseError {
667 constructor(cause, context) {
668 super('generic dml failure', cause, context);
669 }
670}
671exports.DmlFailureError = DmlFailureError;
672/**
673 * Indicates that the index was not ready yet.
674 *
675 * @category Error Handling
676 */
677class IndexNotReadyError extends CouchbaseError {
678 constructor(cause, context) {
679 super('index not ready', cause, context);
680 }
681}
682exports.IndexNotReadyError = IndexNotReadyError;
683/**
684 * Indicates that an error occurred while compiling a query.
685 *
686 * @category Error Handling
687 */
688class CompilationFailureError extends CouchbaseError {
689 constructor(cause, context) {
690 super('compilation failure', cause, context);
691 }
692}
693exports.CompilationFailureError = CompilationFailureError;
694/**
695 * Indicates that the job queue for the service was full and further requests will
696 * be rejected for a period of time until the queue shrinks.
697 *
698 * @category Error Handling
699 */
700class JobQueueFullError extends CouchbaseError {
701 constructor(cause, context) {
702 super('job queue full', cause, context);
703 }
704}
705exports.JobQueueFullError = JobQueueFullError;
706/**
707 * Indicates that the referenced dataset does not exist.
708 *
709 * @category Error Handling
710 */
711class DatasetNotFoundError extends CouchbaseError {
712 constructor(cause, context) {
713 super('dataset not found', cause, context);
714 }
715}
716exports.DatasetNotFoundError = DatasetNotFoundError;
717/**
718 * Indicates that the referenced dataverse does not exist.
719 *
720 * @category Error Handling
721 */
722class DataverseNotFoundError extends CouchbaseError {
723 constructor(cause, context) {
724 super('dataverse not found', cause, context);
725 }
726}
727exports.DataverseNotFoundError = DataverseNotFoundError;
728/**
729 * Indicates that the referenced dataset already exists, but the operation
730 * expected that it did not.
731 *
732 * @category Error Handling
733 */
734class DatasetExistsError extends CouchbaseError {
735 constructor(cause, context) {
736 super('dataset exists', cause, context);
737 }
738}
739exports.DatasetExistsError = DatasetExistsError;
740/**
741 * Indicates that the referenced dataverse already exists, but the operation
742 * expected that it did not.
743 *
744 * @category Error Handling
745 */
746class DataverseExistsError extends CouchbaseError {
747 constructor(cause, context) {
748 super('dataverse exists', cause, context);
749 }
750}
751exports.DataverseExistsError = DataverseExistsError;
752/**
753 * Indicates that the referenced link does not exist.
754 *
755 * @category Error Handling
756 */
757class LinkNotFoundError extends CouchbaseError {
758 constructor(cause, context) {
759 super('link not found', cause, context);
760 }
761}
762exports.LinkNotFoundError = LinkNotFoundError;
763/**
764 * Indicates that the link already exists.
765 *
766 * @category Error Handling
767 */
768class LinkExistsError extends CouchbaseError {
769 constructor(cause, context) {
770 super('link already exists', cause, context);
771 }
772}
773exports.LinkExistsError = LinkExistsError;
774/**
775 * Indicates that the referenced view does not exist.
776 *
777 * @category Error Handling
778 */
779class ViewNotFoundError extends CouchbaseError {
780 constructor(cause, context) {
781 super('view not found', cause, context);
782 }
783}
784exports.ViewNotFoundError = ViewNotFoundError;
785/**
786 * Indicates that the referenced design document does not exist.
787 *
788 * @category Error Handling
789 */
790class DesignDocumentNotFoundError extends CouchbaseError {
791 constructor(cause, context) {
792 super('design document not found', cause, context);
793 }
794}
795exports.DesignDocumentNotFoundError = DesignDocumentNotFoundError;
796/**
797 * Indicates that the referenced collection already exists, but the operation
798 * expected that it did not.
799 *
800 * @category Error Handling
801 */
802class CollectionExistsError extends CouchbaseError {
803 constructor(cause, context) {
804 super('collection exists', cause, context);
805 }
806}
807exports.CollectionExistsError = CollectionExistsError;
808/**
809 * Indicates that the referenced scope already exists, but the operation
810 * expected that it did not.
811 *
812 * @category Error Handling
813 */
814class ScopeExistsError extends CouchbaseError {
815 constructor(cause, context) {
816 super('scope exists', cause, context);
817 }
818}
819exports.ScopeExistsError = ScopeExistsError;
820/**
821 * Indicates that the referenced user does not exist.
822 *
823 * @category Error Handling
824 */
825class UserNotFoundError extends CouchbaseError {
826 constructor(cause, context) {
827 super('user not found', cause, context);
828 }
829}
830exports.UserNotFoundError = UserNotFoundError;
831/**
832 * Indicates that the referenced group does not exist.
833 *
834 * @category Error Handling
835 */
836class GroupNotFoundError extends CouchbaseError {
837 constructor(cause, context) {
838 super('group not found', cause, context);
839 }
840}
841exports.GroupNotFoundError = GroupNotFoundError;
842/**
843 * Indicates that the referenced bucket already exists, but the operation
844 * expected it to not exist.
845 *
846 * @category Error Handling
847 */
848class BucketExistsError extends CouchbaseError {
849 constructor(cause, context) {
850 super('bucket exists', cause, context);
851 }
852}
853exports.BucketExistsError = BucketExistsError;
854/**
855 * Indicates that the referenced user already exists, but the operation
856 * expected it to not exist.
857 *
858 * @category Error Handling
859 */
860class UserExistsError extends CouchbaseError {
861 constructor(cause, context) {
862 super('user exists', cause, context);
863 }
864}
865exports.UserExistsError = UserExistsError;
866/**
867 * Indicates that the bucket could not be flushed due to not having the flush
868 * option enabled. This option can be dynamically adjusted.
869 *
870 * @category Error Handling
871 */
872class BucketNotFlushableError extends CouchbaseError {
873 constructor(cause, context) {
874 super('bucket not flushable', cause, context);
875 }
876}
877exports.BucketNotFlushableError = BucketNotFlushableError;
878/**
879 * Indicates that the referenced eventing function does not exist.
880 *
881 * @category Error Handling
882 */
883class EventingFunctionNotFoundError extends CouchbaseError {
884 constructor(cause, context) {
885 super('eventing function not found', cause, context);
886 }
887}
888exports.EventingFunctionNotFoundError = EventingFunctionNotFoundError;
889/**
890 * Indicates that the referenced eventing function was not deployed but was
891 * expected to have been.
892 *
893 * @category Error Handling
894 */
895class EventingFunctionNotDeployedError extends CouchbaseError {
896 constructor(cause, context) {
897 super('eventing function not deployed', cause, context);
898 }
899}
900exports.EventingFunctionNotDeployedError = EventingFunctionNotDeployedError;
901/**
902 * Indicates that the eventing function was not able to be compiled.
903 *
904 * @category Error Handling
905 */
906class EventingFunctionCompilationFailureError extends CouchbaseError {
907 constructor(cause, context) {
908 super('eventing function compilation failed', cause, context);
909 }
910}
911exports.EventingFunctionCompilationFailureError = EventingFunctionCompilationFailureError;
912/**
913 * Indicates that the source and metadata keyspaces both referenced the same
914 * place for an eventing function.
915 *
916 * @category Error Handling
917 */
918class EventingFunctionIdenticalKeyspaceError extends CouchbaseError {
919 constructor(cause, context) {
920 super('eventing function identical keyspace', cause, context);
921 }
922}
923exports.EventingFunctionIdenticalKeyspaceError = EventingFunctionIdenticalKeyspaceError;
924/**
925 * Indicates that an eventing function was deployed but has not yet fully
926 * completed the bootstrapping process.
927 *
928 * @category Error Handling
929 */
930class EventingFunctionNotBootstrappedError extends CouchbaseError {
931 constructor(cause, context) {
932 super('eventing function not bootstrapped', cause, context);
933 }
934}
935exports.EventingFunctionNotBootstrappedError = EventingFunctionNotBootstrappedError;
936/**
937 * Indicates that an eventing function is deployed but the operation expected
938 * that it was not.
939 *
940 * @category Error Handling
941 */
942class EventingFunctionDeployedError extends CouchbaseError {
943 constructor(cause, context) {
944 super('eventing function deployed', cause, context);
945 }
946}
947exports.EventingFunctionDeployedError = EventingFunctionDeployedError;
948/**
949 * Indicates that an eventing function is paused but the operation expected
950 * that it was not.
951 *
952 * @category Error Handling
953 */
954class EventingFunctionPausedError extends CouchbaseError {
955 constructor(cause, context) {
956 super('eventing function paused', cause, context);
957 }
958}
959exports.EventingFunctionPausedError = EventingFunctionPausedError;
960/**
961 * Indicates a transaction operation failed to complete.
962 *
963 * @category Error Handling
964 */
965class TransactionOperationFailedError extends CouchbaseError {
966 constructor(cause, context) {
967 super('transaction operation failed', cause, context);
968 }
969}
970exports.TransactionOperationFailedError = TransactionOperationFailedError;
971/**
972 * Indicates a transaction failed to complete.
973 *
974 * @category Error Handling
975 */
976class TransactionFailedError extends CouchbaseError {
977 constructor(cause, context) {
978 super('transaction failed', cause, context);
979 }
980}
981exports.TransactionFailedError = TransactionFailedError;
982/**
983 * Indicates a transaction failed to complete due to expiring.
984 *
985 * @category Error Handling
986 */
987class TransactionExpiredError extends CouchbaseError {
988 constructor(cause) {
989 super('transaction expired', cause);
990 }
991}
992exports.TransactionExpiredError = TransactionExpiredError;
993/**
994 * Indicates the state of a transaction ended as ambiguous and may or
995 * may not have committed successfully.
996 *
997 * @category Error Handling
998 */
999class TransactionCommitAmbiguousError extends CouchbaseError {
1000 constructor(cause) {
1001 super('transaction commit ambiguous', cause);
1002 }
1003}
1004exports.TransactionCommitAmbiguousError = TransactionCommitAmbiguousError;