Refactoring BP Code with ErrorCatalog
[ccsdk/cds.git] / ms / error-catalog / core / src / main / kotlin / org / onap / ccsdk / cds / error / catalog / core / ErrorCodes.kt
index 86483e3..8023d97 100644 (file)
@@ -54,8 +54,7 @@ object HttpErrorCodes {
     }
 
     fun code(type: String): Int {
-        // FIXME("Return Default Error Code , If missing")
-        return store[type]!!
+        return store[type] ?: store[ErrorCatalogCodes.GENERIC_FAILURE]!!
     }
 }
 
@@ -82,7 +81,6 @@ object GrpcErrorCodes {
     }
 
     fun code(type: String): Int {
-        // FIXME("Return Default Error Code , If missing")
-        return store[type]!!
+        return store[type] ?: store[ErrorCatalogCodes.GENERIC_FAILURE]!!
     }
 }