diff --git a/migration/20.03/migrateTemplates.php b/migration/20.03/migrateTemplates.php
index f7a770c1af12a4b6a1fa118bccf22eb85c800ba3..c9ea4e7d194f776074840a212e600facaddc114d 100644
--- a/migration/20.03/migrateTemplates.php
+++ b/migration/20.03/migrateTemplates.php
@@ -259,11 +259,16 @@ foreach ($customs as $custom) {
                 $resource = file_get_contents($pathFilename);
                 $pathInfo = pathinfo($pathFilename);
                 $storeResult = DocserverController::storeResourceOnDocServer([
-                        'collId'            => 'templates',
-                        'docserverTypeId'   => 'TEMPLATES',
-                        'encodedResource'   => base64_encode($resource),
-                        'format'            => $pathInfo['extension']
-                    ]);
+                    'collId'           => 'templates',
+                    'docserverTypeId'  => 'TEMPLATES',
+                    'encodedResource'  => base64_encode($resource),
+                    'format'           => $pathInfo['extension']
+                ]);
+
+                if (!empty($storeResult['errors'])) {
+                    echo $storeResult['errors'];
+                    continue;
+                }
 
                 TemplateModel::update([
                         'set'   => [