Hi,
callRestAPI() can be configured to throw an exception when an error occurs. Would it be possible to add an option to exclude the timestamp from the exception message?
We use Sentry for error monitoring, and including the timestamp prevents proper grouping because each exception message becomes unique.
I understand the timestamp may be useful to existing users, so keeping the current behavior as the default and making the timestamp optional would probably avoid breaking changes.
Relevant code:
|
} |
|
} |
|
if ($description !== '') { |
|
$description = date('Y-m-d H:i:s ') . "{$description}"; |
|
$description .= "[URL({$this->method}): {$this->url}]"; |
|
if ($errorCode !== 401) { |
|
throw new Exception($description, $errorCode); |
|
} |
|
} |
Hi,
callRestAPI()can be configured to throw an exception when an error occurs. Would it be possible to add an option to exclude the timestamp from the exception message?We use Sentry for error monitoring, and including the timestamp prevents proper grouping because each exception message becomes unique.
I understand the timestamp may be useful to existing users, so keeping the current behavior as the default and making the timestamp optional would probably avoid breaking changes.
Relevant code:
FMDataAPI/src/Supporting/CommunicationProvider.php
Lines 670 to 678 in 94a5a32