Skip to content

Commit 9b38967

Browse files
committed
fix: improve logging messages for metadata retrieval fallback
1 parent 820d42a commit 9b38967

File tree

1 file changed

+2
-2
lines changed
  • lms-jobs/credential-generator/collection-cert-pre-processor/src/main/scala/org/sunbird/job/collectioncert/functions

1 file changed

+2
-2
lines changed

lms-jobs/credential-generator/collection-cert-pre-processor/src/main/scala/org/sunbird/job/collectioncert/functions/IssueCertificateHelper.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ trait IssueCertificateHelper {
179179
config.assessmentContentTypes.contains(contentType)
180180
} else {
181181
// Fallback: Try to fetch metadata from API
182-
logger.info(s"IssueCertificateHelper:: getMaxScore:: Metadata cache not available for: $key, attempting API fallback")
182+
logger.info(s"IssueCertificateHelper:: getMaxScore:: Metadata not available in cache for: $key, attempting API fallback")
183183
val apiMetadata = getContentMetadataFromAPI(key)(config, httpUtil)
184184

185185
if (apiMetadata.nonEmpty) {
@@ -190,7 +190,7 @@ trait IssueCertificateHelper {
190190
logger.error(s"IssueCertificateHelper:: getMaxScore:: Suppressed exception: Metadata not available in cache or API for: $key")
191191
false
192192
} else {
193-
throw new Exception("Metadata cache not available for: " + key)
193+
throw new Exception("Metadata not available in cache or API " + key)
194194
}
195195
}
196196
})

0 commit comments

Comments
 (0)