avniproject / integration-service

Service for integration Avni with other systems
GNU Affero General Public License v3.0
0 stars 2 forks source link

Minor changes to Goonj Integration Error Reporting #122

Closed himeshr closed 5 months ago

himeshr commented 5 months ago

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

himeshr commented 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.?

Screenshot 2024-04-11 at 7 32 18 PM