[ARVADOS-WORKBENCH2] created: 1.2.0-542-g623ecbe

Git user git at public.curoverse.com
Thu Oct 4 15:53:25 EDT 2018


        at  623ecbeea4eca312e71e17ec95d08c741fd25d5d (commit)


commit 623ecbeea4eca312e71e17ec95d08c741fd25d5d
Author: Daniel Kos <daniel.kos at contractors.roche.com>
Date:   Thu Oct 4 21:53:14 2018 +0200

    Fix throwing exception in load resource instead of returning undefined
    
    No issue #
    
    Arvados-DCO-1.1-Signed-off-by: Daniel Kos <daniel.kos at contractors.roche.com>

diff --git a/src/store/resources/resources-actions.ts b/src/store/resources/resources-actions.ts
index 0034e7a..0453236 100644
--- a/src/store/resources/resources-actions.ts
+++ b/src/store/resources/resources-actions.ts
@@ -20,12 +20,14 @@ export const updateResources = (resources: Resource[]) => resourcesActions.SET_R
 
 export const loadResource = (uuid: string) =>
     async (dispatch: Dispatch, getState: () => RootState, services: ServiceRepository) => {
-        const kind = extractUuidKind(uuid);
-        const service = getResourceService(kind)(services);
-        if (service) {
-            const resource = await service.get(uuid);
-            dispatch<any>(updateResources([resource]));
-            return resource;
-        }
+        try {
+            const kind = extractUuidKind(uuid);
+            const service = getResourceService(kind)(services);
+            if (service) {
+                const resource = await service.get(uuid);
+                dispatch<any>(updateResources([resource]));
+                return resource;
+            }
+        } catch {}
         return undefined;
-    };
\ No newline at end of file
+    };

-----------------------------------------------------------------------


hooks/post-receive
-- 




More information about the arvados-commits mailing list