diff --git a/src/customCategory.js b/src/customCategory.js
index 3b79194c..387b2dff 100644
--- a/src/customCategory.js
+++ b/src/customCategory.js
@@ -25,7 +25,15 @@ class CustomCategoryRepository {
     }
 
     ajax('customCategory', { id }, (result) => {
-      const data = yaml.load(result)
+      let data
+      cache[id] = result
+
+      try {
+        data = yaml.load(result)
+      }
+      catch (e) {
+        return global.alert(e)
+      }
 
       if (Object.is(data) && !('name' in data)) {
         data.name = 'Custom ' + id.substr(0, 6)