Skip to content
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

Define the value argument in the TFChainError constructor #3305

Merged
merged 2 commits into from
Aug 14, 2024

Conversation

Mahmoud-Emad
Copy link
Contributor

@Mahmoud-Emad Mahmoud-Emad commented Aug 13, 2024

Description

Following the code changes suggested in this PR discussion, we initially observed that the Generic Type handled the failure correctly but the TFChain failed. However, later on, @zaelgohary reported a change in the error pattern—neither KeyError nor TFChainError was being generated.

After further debugging with @0oM4R, we identified the root cause: the value of the property was being sent as a string or undefined, while the method expects an object in the format {value: 'The actual value'}. Additionally, we discovered that using {enumerable: true} when defining properties helps ensure that the attributes are displayed correctly when errors are thrown.

Changes

  • Send the value of the prop that I want to define as an object that contains a 'value' attr
  • Set the 'enumerable: true' to display the error args

Related Issues

image

Checklist

  • Tests included
  • Build pass
  • Documentation
  • Code format and docstrings
  • Screenshots/Video attached (needed for UI changes)

- Send the value of the prop that i want to define as an object that contain a 'value' attr
- Set the 'enumerable: ture' to display the error args
@Mahmoud-Emad Mahmoud-Emad changed the title fix: Define the value arg in the TFChainError constructor: Define the value argument in the TFChainError constructor Aug 14, 2024
- dynamically defines the TFChainError key property instead of making a condition on each key in the 'TFChainError' contractor.
@Mahmoud-Emad Mahmoud-Emad merged commit c01febd into development Aug 14, 2024
9 checks passed
@Mahmoud-Emad Mahmoud-Emad deleted the development_tfchain_error_handling branch August 14, 2024 06:54
@xmonader xmonader added this to the 2.6.0 milestone Sep 24, 2024
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.

4 participants