Skip to content

fix: correct basic message connectionId error - #1771

Open
shivansh45334 wants to merge 1 commit into
credebl:mainfrom
shivansh45334:fix-1229-basic-message-error
Open

shivansh45334 wants to merge 1 commit into
credebl:mainfrom
shivansh45334:fix-1229-basic-message-error

Conversation

@shivansh45334

@shivansh45334 shivansh45334 commented Oct 3, 2026 •

Copy link
Copy Markdown

Description

Fixes the incorrect validation error message returned when an invalid
connectionId is provided to the basic message endpoint.

Changes

  • Added a dedicated error message for invalid connectionId values in the basic message endpoint.
  • Updated the basic message controller to use the new error message.
  • Preserved the existing connectionId validation message for other endpoints.

One important point: I did not change the shared invalidConnectionId message, because that message is also used by the normal connection-details endpoint. I instead introduced a dedicated message for the basic-message endpoint, keeping the change narrowly scoped.

Issue

Closes #1229

Summary by CodeRabbit

  • Bug Fixes
    • Invalid connection IDs in basic message requests now return a specific error asking for a valid connection ID.

@coderabbitai

coderabbitai Bot commented Oct 3, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

Navigate logical layers of code changes, visualize relationships, and explore their blast radius.

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 50 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

⚙️ Run configuration
  • Configuration used: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 442d3568-f293-46c2-8875-559dfbae93ff
📥 Commits

Reviewing files that changed from the base of the PR and between 03aeb71 and 47d7761.

📒 Files selected for processing (2)
  • apps/api-gateway/src/connection/connection.controller.ts
  • libs/common/src/response-messages/index.ts

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 23395d41-e797-4ba8-891d-4992e3d5642e
📥 Commits

Reviewing files that changed from the base of the PR and between 3046294 and 03aeb71.

📒 Files selected for processing (2)
  • apps/api-gateway/src/connection/connection.controller.ts
  • libs/common/src/response-messages/index.ts

Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.


📝 Walkthrough

Walkthrough

The basic-message endpoint now returns a dedicated error message when the connectionId UUID validation fails.

Changes

Basic message connection ID error

Layer / File(s) Summary
Basic-message UUID validation error
libs/common/src/response-messages/index.ts, apps/api-gateway/src/connection/connection.controller.ts
The connection error messages include invalidBasicMessageConnectionId. The endpoint uses this message when UUID validation fails.

Priority: ⬇️ Low

Estimated code review effort: 1 (Trivial) | ~5 minutes

Change: Bug fix · Severity of issue fixed: Low

Merge Risk: ⚪ Minimal · up to 03aeb

The basic-message endpoint now returns a more specific error message when connectionId is invalid. Other endpoints keep their existing message. No merge-blocking risk was found.

🚥 Pre-merge checks | ✅ 4 | ❓ 1

❌ Failed checks (1 inconclusive)

Check name Status Explanation Resolution
Linked Issues check ❓ Inconclusive Issue [#1229] requires a 400 response with the exact message “Please provide valid connectionId” for an invalid basic-message connectionId. The change summary confirms that sendBasicMessage now thro… Provide reviewable evidence of the invalidBasicMessageConnectionId message value to confirm that it exactly matches the wording required by issue #1229.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly identifies the fix to the basic message connectionId error.
Out of Scope Changes check ✅ Passed The change summary lists only the dedicated basic-message error message and its use in the basic-message controller. Both changes directly implement issue [#1229]. No unrelated changes are indicated.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 2…
Full details: Linked Issues check

Explanation

Issue [#1229] requires a 400 response with the exact message “Please provide valid connectionId” for an invalid basic-message connectionId. The change summary confirms that sendBasicMessage now throws BadRequestException with the dedicated invalidBasicMessageConnectionId message. The controller source also shows that the normal connection-details endpoint still uses invalidConnectionId. The exact value of the new message is not visible in the available source output, so I cannot confirm the required wording.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create a new PR
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Signed-off-by: Shivansh <shivansh45334@gamil.com>
@shivansh45334
shivansh45334 force-pushed the fix-1229-basic-message-error branch from 03aeb71 to 47d7761 Compare October 3, 2026 06:32
@sonarqubecloud

sonarqubecloud Bot commented Oct 3, 2026

Copy link
Copy Markdown

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.

fix: Incorrect error message when space is provided in 'connectionId' parameter

1 participant