Skip to content

Enable to configure Exception Behavior #200

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

Open
rido-min opened this issue Apr 10, 2025 · 4 comments · Fixed by #218
Open

Enable to configure Exception Behavior #200

rido-min opened this issue Apr 10, 2025 · 4 comments · Fixed by #218
Labels
enhancement New feature or request feature-request Used to mark a issue that is proposed to be a feature addition or change

Comments

@rido-min
Copy link
Member

By default we are sending the exception details, including the StackTrace, to the channel.

This is not recommended [1] and should be disabled by default, with an opt-in option for development, in the same way that WebAPI projects allow to use app.UseDeveloperExceptionPage();

[1] https://cwe.mitre.org/data/definitions/209.html

@rido-min rido-min added feature-request Used to mark a issue that is proposed to be a feature addition or change triage Initial state for our team to determine nessessary action labels Apr 10, 2025
@tracyboehrer
Copy link
Member

tracyboehrer commented Apr 10, 2025

This is due to the default Adapter.OnTurnError handling. Most will supply their own handler since they want friendlier messages. Also some will opt to handoff to a live agent. We could stand to make this more apparent.

@rido-min
Copy link
Member Author

yes, and the ask here is to configure OnTurnError to only include the stack trace when InDevelopment.

@MattB-msft MattB-msft added enhancement New feature or request and removed triage Initial state for our team to determine nessessary action labels Apr 23, 2025
@MattB-msft
Copy link
Member

MattB-msft commented Apr 23, 2025

for the moment this code has been updated to only emit stack traces when deployed in debug mode.
Will keep this item open to revisit in the near future.

@tracyboehrer
Copy link
Member

I would add to this... It is common for Cx to supply a different OnTurnError to handler for these exceptions. Display a friendlier message, hand-off to a live agent, etc...

Future work should include an easier way to do this since it still requires a CloudAdapter subclass. Though... if AgentApplicationOptions.Adapter is setup, they could do this in code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request feature-request Used to mark a issue that is proposed to be a feature addition or change
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants