Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Today, the error indicator is populated with a String representing an error that will be presented as is at the Data Import logs in the FOLIO UI. When appropriate an error object is populated instead of a string. The error object will have properties at minimum:

  • code: Error code for the user facing error
  • message: user facing error message that should include the code. Message should be descriptive enough to aid in issue resolution.
  • cause: "ugly" java exceptions as seen today, most likely containing stacktraces

...

Panel


Code Block
{DOMAIN}-XXX
  • XXX represent three integers. So it will range from 000 to 999.
    • "000" is reserved for errors that are caught but for which no corresponding user-friendly error message can be determined; essentially a fallback. This code will be flagged as a candidate for resolution, with the addition of a user-friendly message to be added to the Domain Owning Module.
  • Here is general guidance for the {Domain} value:

    ModuleError Code
    mod-inventoryINSTANCE-XXX, HOLDING-XXX, ITEM-XXX
    mod-ordersORDER-XXX
    mod-invoiceINVOICE-XXX


Source Record Manager(SRM)

...

Info

The FOLIO UI can be modified to show the system error via extra clicks of UI controls around the user-friendly message.

SRM should be backward-compatible with scenarios that cannot generate user-friendly errors. This can be achieved through the following decision tree:

  • If a string value is encountered in the error indicator of a Data Import Event Payload, store this value in the error property of the journal record. In this case, the "system_error" property will remain empty.

  • If an Error Object is encountered in the error indicator of a Data Import Event Payload, store the message property of the Error Object in the error property of the journal record. Then, store the "cause" property of the Error Object in the system_error property of the journal record.

Error Code Persistence

Error codes and their corresponding messages will be stored in property files inside the Domain Owning Module. If the module is written in Java, these property files should be placed in the Resources folder of the FOLIO module. This arrangement will enable the use of ResourceBundle for obtaining future translations. It will also centralize messages in one location for regular review and minimize code collisions. Example:

Code Block
titleitem_error_messages_en.properties
000=Internal Error
001=Item not found

...