Closed himeshr closed 5 months ago
@vinayvenu Tests work as expected, but in prod, the first errorRecordLog is the one returned by ErrorRecord.getLastErrorRecordLog(), which is a problem in general for all integration systems. Unable to figure out why.?
Problem 1
We encounter different kinds of error in Goonj-Avni integration, which results in a need to create new GoonjErrorTypes in DB. Whenever we do this, it also needs a corresponding addition to GoonjErrorType Enum, which is a costly effort.
Solution 1
Make Goonj Error type name in ErrorRecordLog independent of GoonjErrorType Enum.
Problem 2
Salesforce Team needs to only know the latest error that is currently blocking the entity from getting synced to to the system.
Solution 2
Replace the ErrorRecordLog every time to ensure that the latest entry with most recent error loggedAt dateTime is retained in the system