Skip to content

Commit

Permalink
Merge pull request #611 from cresjie/next/1.x/main
Browse files Browse the repository at this point in the history
Added fallback message to Rollbar API rejection verbose log
  • Loading branch information
danielmorell authored Mar 22, 2023
2 parents 2f3e4e0 + 954f5bc commit 0b48c80
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/RollbarLogger.php
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,9 @@ public function log($level, $toLog, array $context = array(), $isUncaught = fals
$this->verboseLogger()->error('Occurrence rejected by the SDK: ' . $response);
} elseif ($response->getStatus() >= 400) {
$info = $response->getInfo();
$this->verboseLogger()->error('Occurrence rejected by the API: ' . $info['message']);
$this->verboseLogger()->error(
'Occurrence rejected by the API: ' . (isset($info['message']) ? $info['message'] : 'message not set')
);
} else {
$this->verboseLogger()->info('Occurrence successfully logged');
}
Expand Down

0 comments on commit 0b48c80

Please sign in to comment.