Record LogEvent in a table with preconditions and postprocess.

Hello, I'm currently working on enhancing the logging functionality for my API to gain better insights into error occurrences. Here's a summary of the steps I've taken:

  1. Established a dedicated table to store log events systematically.

  2. Developed a function responsible for adding new log events to the designated table.

  3. Implemented a post-process utility function at specific endpoints, calling the "Add log events" function to capture and store all relevant events.

Despite this, I've encountered an issue related to API request preconditions. When a request is halted by a precondition function due to error handling, it appears that the postprocess isn't triggered.

Do you have any idea how to handle this ?

Thanks ! โœŒ๏ธ

1 reply