Skip to content

fix: [#4902][onTurnError] unhandled error for informative streaming#571

Closed
ceciliaavila wants to merge 1 commit intomainfrom
southworks/fix/missing-entity-props
Closed

fix: [#4902][onTurnError] unhandled error for informative streaming#571
ceciliaavila wants to merge 1 commit intomainfrom
southworks/fix/missing-entity-props

Conversation

@ceciliaavila
Copy link

Fixes # 4902
#minor

Description

After migrating from azure/core-http to azure/core-client package, the CompositeMapper changed its behavior regarding additional properties. Now, they must be defined in the model.
This PR fixes the issue of unmapped additional properties in the Entity by explicitly incorporating the object into the Entity model.

Specific Changes

  • Updated connectorApi/models/mappers including the additionalProperties object in the Entity model. Additionally, we removed it from the entities array as it was redundant.

Testing

This image shows the informative streamInfo message being displayed after applying the fix.
image

@coderabbitai
Copy link

coderabbitai bot commented Sep 11, 2025

📝 Walkthrough

Walkthrough

Adds top-level additionalProperties to the Entity CompositeMapper and removes the additionalProperties block from the inline Entity within Activity.entities items in mappers.ts. No other files changed.

Changes

Cohort / File(s) Summary
Mapper schema updates
libraries/botframework-connector/src/connectorApi/models/mappers.ts
Entity CompositeMapper now has additionalProperties: { type: { name: "Object" } }. In Activity’s entities sequence, the inline Entity item no longer declares additionalProperties and retains only className: "Entity".

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Pre-merge checks (3 passed)

✅ Passed checks (3 passed)
Check name Status Explanation
Title Check ✅ Passed The title identifies this change as a bug fix and explicitly references issue #4902 and the observed symptom (an unhandled onTurnError during informative streaming), which aligns with the PR objectives; it is concise and focused on the user-facing problem fixed by the changeset, though it highlights the symptom rather than the specific mapper change.
Description Check ✅ Passed The PR description clearly explains the migration context (from @azure/core-http to @azure/core-client), the changed CompositeMapper behavior, and the concrete fix (adding additionalProperties to the Entity model and removing the redundant entry from the entities array), which directly matches the changes in the provided summary and PR objectives.
Docstring Coverage ✅ Passed No functions found in the changes. Docstring coverage check skipped.

Poem

I twitch my ears at schema’s tune,
Extra fields can now festoon;
Entities dance, unboxed and free,
While inline mates keep modestly.
In mapper meadows, neat and tight—
A hop, a fix, all typed just right. 🐇✨

Tip

👮 Agentic pre-merge checks are now available in preview!

Pro plan users can now enable pre-merge checks in their settings to enforce checklists before merging PRs.

  • Built-in checks – Quickly apply ready-made checks to enforce title conventions, require pull request descriptions that follow templates, validate linked issues for compliance, and more.
  • Custom agentic checks – Define your own rules using CodeRabbit’s advanced agentic capabilities to enforce organization-specific policies and workflows. For example, you can instruct CodeRabbit’s agent to verify that API documentation is updated whenever API schema files are modified in a PR. Note: Upto 5 custom checks are currently allowed during the preview period. Pricing for this feature will be announced in a few weeks.

Please see the documentation for more information.

Example:

reviews:
  pre_merge_checks:
    custom_checks:
      - name: "Undocumented Breaking Changes"
        mode: "warning"
        instructions: |
          Pass/fail criteria: All breaking changes to public APIs, CLI flags, environment variables, configuration keys, database schemas, or HTTP/GraphQL endpoints must be documented in the "Breaking Change" section of the PR description and in CHANGELOG.md. Exclude purely internal or private changes (e.g., code not exported from package entry points or explicitly marked as internal).

Please share your feedback with us on this Discord post.

✨ Finishing touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch southworks/fix/missing-entity-props

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 and usage tips.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Nitpick comments (2)
libraries/botframework-connector/src/connectorApi/models/mappers.ts (2)

402-407: LGTM on behavior; tidy Prettier nits on additionalProperties.

Adding additionalProperties at the Entity level is the right fix for core-client. Prettier flags quotes/trailing commas here—patch below.

-    additionalProperties: {
-      type: {
-        name: "Object"
-      }
-    }
+    additionalProperties: {
+      type: {
+        name: 'Object',
+      },
+    }

717-721: Inline Entity mapper change is correct; fix style to satisfy Prettier.

Pointing the sequence element to Entity (and removing the per-item additionalProperties) is correct now that Entity carries it. Prettier wants single quotes and a trailing comma.

-              className: "Entity"
+              className: 'Entity',
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 37b324c and 6ad5b1a.

📒 Files selected for processing (1)
  • libraries/botframework-connector/src/connectorApi/models/mappers.ts (2 hunks)
🧰 Additional context used
🪛 ESLint
libraries/botframework-connector/src/connectorApi/models/mappers.ts

[error] 402-402: Replace ···· with ········

(prettier/prettier)


[error] 403-403: Replace ···· with ········

(prettier/prettier)


[error] 404-404: Insert ······

(prettier/prettier)


[error] 405-405: Replace ········name:·"Object" with ················name:·'Object',

(prettier/prettier)


[error] 406-406: Replace ······} with ············},

(prettier/prettier)


[error] 719-719: Replace ··············className:·"Entity" with ····························className:·'Entity',

(prettier/prettier)

⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (11)
  • GitHub Check: lint
  • GitHub Check: test:schemas
  • GitHub Check: tests.yml ubuntu (node 18.x)
  • GitHub Check: depcheck
  • GitHub Check: tests.yml windows (node 20.x)
  • GitHub Check: tests.yml windows (node 18.x)
  • GitHub Check: tests.yml ubuntu (node 22.x)
  • GitHub Check: tests.yml windows (node 22.x)
  • GitHub Check: tests.yml ubuntu (node 20.x)
  • GitHub Check: test:compat
  • GitHub Check: test:consumer

@ceciliaavila
Copy link
Author

/promoted 4903

@ceciliaavila ceciliaavila deleted the southworks/fix/missing-entity-props branch September 11, 2025 17:07
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.

2 participants