Skip to content

[OGUI-1664] add new custom error for failed depedency#2854

Merged
graduta merged 3 commits into
devfrom
improv/WEB/OGUI-1664/add-new-custom-error
May 6, 2025
Merged

[OGUI-1664] add new custom error for failed depedency#2854
graduta merged 3 commits into
devfrom
improv/WEB/OGUI-1664/add-new-custom-error

Conversation

@graduta

@graduta graduta commented May 6, 2025

Copy link
Copy Markdown
Member

I have JIRA issue created

  • branch and/or PR name(s) includes JIRA ID
  • issue has "Fix version" assigned
  • issue "Status" is set to "In review"
  • PR labels are selected
  • FLP integration tests were ran successful

PR which:

  • adds a new custom error for "FailedDependency" which will allow the server to be specific when a dependency service successfully responded but with non-expected response format
  • bumps the patch version for quick release
  • removes debug log which currently spams the log files

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull Request Overview

This PR adds a new custom error for a "Failed Dependency" scenario, updates error response handling to return a specific HTTP status for this error, and removes verbose debug logging in the Kafka consumer.

  • Adds FailedDependencyError class
  • Updates updateAndSendExpressResponseFromNativeError to support the new error
  • Adds mocha tests for the new error and removes unnecessary debug logs in KafkaMessagesConsumer

Reviewed Changes

Copilot reviewed 4 out of 6 changed files in this pull request and generated 1 comment.

File Description
Framework/Backend/test/errors/mocha-updateExpressResponseFromNativeError.test.js Adds a test case to verify the new error's behavior in updating the response.
Framework/Backend/kafka/KafkaMessagesConsumer.js Removes a debug log message to reduce log spam.
Framework/Backend/errors/updateAndSendExpressResponseFromNativeError.js Includes a new case in the switch statement to handle the FailedDependencyError.
Framework/Backend/errors/FailedDependencyError.js Introduces the custom error class for failed dependencies.
Files not reviewed (2)
  • Framework/package-lock.json: Language not supported
  • Framework/package.json: Language not supported

Comment thread Framework/Backend/errors/FailedDependencyError.js
@graduta graduta merged commit 6b7b02f into dev May 6, 2025
11 of 14 checks passed
@graduta graduta deleted the improv/WEB/OGUI-1664/add-new-custom-error branch May 6, 2025 08:56
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.

2 participants