Improve logging for conversion errors

Description:

There are errors in logs produced by conversion without record id:

java.lang.IllegalArgumentException:Could not find a conversion method for the given input. no transformation 'ED_1950_UTM_Zone_31N' -> 'GCS_WGS_1984'

at org.opengroup.osdu.crs.sis.operation.CRSCoordinateOperationFactory.validateRoute ( org/opengroup.osdu.crs.sis.operation/CRSCoordinateOperationFactory.java:383 )

storage.app: Wrong unitOfMeasureID provided: namespace:reference-data--UnitOfMeasure:m AppException(error=AppError(code=400, reason=Invalid record ID, message=The record 'namespace:reference-data--UnitOfMeasure:m' does not belong to account 'devtwo', errors=null, debuggingInfo=null, originalException=null), originalException=null)

at org.opengroup.osdu.storage.service.QueryServiceImpl.getRecordFromRepository ( org/opengroup.osdu.storage.service/QueryServiceImpl.java:144 )

This MR adds new log record to track which records are malformed. Example:

storage.app: Persistable reference was not obtained for record "osdu:query:61f07399-7251-4fe2-a0b3-b757b75962d612" by unit of measure namespace:reference-data--UnitOfMeasure:m {correlation-id=14a80a3c-4264-420e-86e4-78670b14c1d3, data-partition-id=osdu}

Changes include:

  • Refactor (a non-breaking change that improves code maintainability).
  • Bugfix (a non-breaking change that solves an issue).
  • New feature (a non-breaking change that adds functionality).
  • Breaking change (a change that is not backward-compatible and/or changes current functionality).

Changes in:

  • Common code

Dev Checklist:

  • Added Unit Tests, wherever applicable.
  • Updated the Readme, if applicable.
  • Existing Tests pass
  • Verified functionality locally
  • Self Reviewed my code for formatting and complex business logic.

Other comments:

Any comments to approvers here

Merge request reports

Loading