18484: Makes a list request on collectionService.get().
[arvados-workbench2.git] / src / services / common-service / common-service.ts
index 82777342b3b9931412ecacdac8290d240cf7fdc4..b5dd1a08b2d726d3c294c7f6077e38f1443ffe86 100644 (file)
@@ -68,7 +68,7 @@ export class CommonService<T> {
             }
         }
 
-    private validateUuid(uuid: string) {
+    protected validateUuid(uuid: string) {
         if (uuid === "") {
             throw new Error('UUID cannot be empty string');
         }
@@ -124,7 +124,7 @@ export class CommonService<T> {
         );
     }
 
-    list(args: ListArguments = {}): Promise<ListResults<T>> {
+    list(args: ListArguments = {}, showErrors?: boolean): Promise<ListResults<T>> {
         const { filters, order, ...other } = args;
         const params = {
             ...CommonService.mapKeys(snakeCase)(other),
@@ -135,7 +135,8 @@ export class CommonService<T> {
         if (QueryString.stringify(params).length <= 1500) {
             return CommonService.defaultResponse(
                 this.serverApi.get(`/${this.resourceType}`, { params }),
-                this.actions
+                this.actions,
+                showErrors
             );
         } else {
             // Using the POST special case to avoid URI length 414 errors.
@@ -152,7 +153,8 @@ export class CommonService<T> {
                         _method: 'GET'
                     }
                 }),
-                this.actions
+                this.actions,
+                showErrors
             );
         }
     }