Skip to content

Improve exception handling in LogRequestsToDisk#554

Open
kartubi wants to merge 1 commit intointuit:masterfrom
kartubi:improve-exception-handling-logging
Open

Improve exception handling in LogRequestsToDisk#554
kartubi wants to merge 1 commit intointuit:masterfrom
kartubi:improve-exception-handling-logging

Conversation

@kartubi
Copy link
Copy Markdown

@kartubi kartubi commented Jul 23, 2025

Improve exception handling in LogRequestsToDisk

Currently, the catch block in LogPlatformRequests() throws a generic exception message without including details from the original exception, making debugging difficult.

Changes:

  • Include original exception message and error code in the re-thrown IdsException
  • Preserve original error context for better debugging

Before:
throw new IdsException("Exception during LogPlatformRequests.");

After:
throw new IdsException("Exception during LogPlatformRequests: " . $e->getMessage(), $e->getCode());

This makes it much clearer what actually went wrong when file operations fail during request/response logging.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant