Skip to content
Snippets Groups Projects
Commit 75e87fe0 authored by Benedikt Heinrichs's avatar Benedikt Heinrichs
Browse files

Deal with errors in resource communication

parent 332df4c7
No related branches found
No related tags found
1 merge request!54Fix: Don't fail on logging
Pipeline #922876 passed
......@@ -142,8 +142,16 @@ public static class Helpers
if (returnObject.ResourceTypeOption.ContainsKey("Size"))
{
var resourceTypeDefinition = ResourceTypeFactory.Instance.GetResourceType(resource);
try
{
returnObject.ResourceTypeOption["Size"] = resourceTypeDefinition.GetResourceQuotaAvailable(resource.Id.ToString()).Result;
}
catch (Exception)
{
// Error in communicating with the resource
returnObject.ResourceTypeOption["Size"] = 0;
}
}
return returnObject;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment