Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IBX-190: Added try/catch block for methods using SearchService::findContent #74

Merged

Conversation

ciastektk
Copy link
Contributor

…ontent

Question Answer
JIRA issue IBX-190
Type improvement
Target Ibexa DXP version v4.0
BC breaks no
Doc needed no

This PR provides added try/catch block for methods using SearchService::findContent. If contents are not found in content repository then fetching data from data sources shouldn't be broken. In case when exception will thrown error message will be logged.

Checklist:

  • Provided PR description.
  • Tested the solution manually.
  • Provided automated test coverage.
  • Checked that target branch is set correctly (master for features, the oldest supported for bugs).
  • Ran PHP CS Fixer for new PHP code (use $ composer fix-cs).
  • Asked for a review (ping @ezsystems/php-dev-team).

@ciastektk ciastektk force-pushed the ibx-190-added-try-catch-blocks-in-content-data-source branch from e979082 to cbc435d Compare August 20, 2021 12:14
@ciastektk ciastektk requested review from alongosz and a team August 20, 2021 12:17
@Steveb-p Steveb-p requested a review from a team August 21, 2021 10:19
src/lib/Storage/ContentDataSource.php Outdated Show resolved Hide resolved
@ciastektk ciastektk force-pushed the ibx-190-added-try-catch-blocks-in-content-data-source branch 2 times, most recently from 70a6249 to ecea503 Compare August 30, 2021 08:52
@ciastektk ciastektk requested review from Steveb-p and alongosz August 30, 2021 08:54
@ciastektk ciastektk force-pushed the ibx-190-added-try-catch-blocks-in-content-data-source branch from ecea503 to c9a7dbe Compare August 30, 2021 08:55
Copy link
Contributor

@Steveb-p Steveb-p left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍, although I'd prefer to use LoggerAwareInterface / LoggerAwareTrait. And I sure do hope that handling those exception in this manner will not hide any critical issues with applications.

@Steveb-p Steveb-p requested a review from a team August 31, 2021 07:57
@mikadamczyk mikadamczyk requested a review from a team August 31, 2021 08:12
@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@ciastektk ciastektk merged commit d38d9bd into master Aug 31, 2021
@ciastektk ciastektk deleted the ibx-190-added-try-catch-blocks-in-content-data-source branch August 31, 2021 10:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

5 participants