16848: Avoids showing API errors when the extra token creation fails.
[arvados-workbench2.git] / src / services / common-service / common-service.ts
index 8e00c4ad1abd42897f84cc1634d34a22b5bd48f0..48fcb06dd027c786791afc29bb3d4536890d4a3a 100644 (file)
@@ -88,11 +88,13 @@ export class CommonService<T> {
             });
     }
 
-    create(data?: Partial<T>) {
+    create(data?: Partial<T>, showErrors?: boolean) {
         return CommonService.defaultResponse(
             this.serverApi
                 .post<T>(this.resourceType, data && CommonService.mapKeys(_.snakeCase)(data)),
-            this.actions
+            this.actions,
+            true, // mapKeys
+            showErrors
         );
     }