semantic-kernel icon indicating copy to clipboard operation
semantic-kernel copied to clipboard

.Net Provide common error codes in KernelException

Open Krzysztof318 opened this issue 1 year ago • 2 comments

Hi, a KernelException is thrown in many places in the code, but only with message and the optional inner exception. We should have property of list of error codes in the KernelExeption. And an additional class which contains all error codes with their description. Something like below from handlerbars example but not using codes in the message.

ex.Message.Contains(nameof(HandlebarsPlannerErrorCodes.InsufficientFunctionsForGoal), StringComparison.CurrentCultureIgnoreCase)
            || ex.Message.Contains(nameof(HandlebarsPlannerErrorCodes.HallucinatedHelpers), StringComparison.CurrentCultureIgnoreCase)
            || ex.Message.Contains(nameof(HandlebarsPlannerErrorCodes.InvalidTemplate), StringComparison.CurrentCultureIgnoreCase))

Krzysztof318 avatar Jan 28 '24 14:01 Krzysztof318

@SergeyMenshykh what do you think about this proposal?

markwallace-microsoft avatar Jan 29 '24 12:01 markwallace-microsoft

This issue is stale because it has been open for 90 days with no activity.

github-actions[bot] avatar May 14 '24 01:05 github-actions[bot]

This issue was closed because it has been inactive for 14 days since being marked as stale.

github-actions[bot] avatar May 28 '24 01:05 github-actions[bot]