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

Better error messages for Component build failures #6295

Open
mukundha opened this issue Feb 12, 2025 · 0 comments
Open

Better error messages for Component build failures #6295

mukundha opened this issue Feb 12, 2025 · 0 comments
Labels
bug Something isn't working enhancement New feature or request

Comments

@mukundha
Copy link

Bug Description

I'm trying to use the AstraDBCQLToolComponent and was getting the following error when trying to build / run it

ValidationError: 1 validation error for Data
                             data
                               Input should be a valid dictionary [type=dict_type,
                             input_value='{', input_type=str]
                                 For further information visit
                             https://errors.pydantic.dev/2.10/v/dict_type

The above error message was not really helpful

There was a really long stack trace, which wasn't of much help, but there was a clue somewhere in the middle

functools.partial(<built-in method run of _contextvars.Context
                             object at 0x1777f9fc0>, <bound method AstraDBCQLToolComponent....
                                              |    -> <function BaseEventLoop.run_in_executor
                             at 0x10134bf60>
                                              -> <_UnixSelectorEventLoop running=True
                             closed=False debug=False>
                               File
                             "/Users/mukundha/.pyenv/versions/3.11.8/lib/python3.11/concurrent/
                             futures/thread.py", line 58, in run
                                 result = self.fn(*self.args, **self.kwargs)
                                          |        |            -> None
                                          |        -> None
                                          -> None
                               File "<string>", line 222, in run_model
                               File "<string>", line 222, in <listcomp>
                               File
                             "/Users/mukundha/Documents/work/fy26/workshop/ds-workshops-attende
                             es/langflow/.venv/lib/python3.11/site-packages/pydantic/main.py",
                             line 214, in __init__

It looked like error might be related to the run_model

tried to add few prints to debug the vars, then started seeing more useful error messages, for eg,

{'description': 'Unauthenticated gRPC operation (Status.Code.UNAUTHENTICATED->401): UNAUTHENTICATED: Invalid token', 'code': 401, 'grpcStatus': 'UNAUTHENTICATED', 'internalTxId': None}

{'description': "Table 'sensor_data' not found (in keyspace 'default_keyspace')", 'code': 400, 'grpcStatus': None, 'internalTxId': None}

If we are able to surface these messages to the Component status, that would be extremely helpful for the developers.

Reproduction

  • Add AstraDBCQLToolComponent
  • Specify a wrong token
  • Try to build

Expected behavior

Expected error:

{'description': 'Unauthenticated gRPC operation (Status.Code.UNAUTHENTICATED->401): UNAUTHENTICATED: Invalid token', 'code': 401, 'grpcStatus': 'UNAUTHENTICATED', 'internalTxId': None}

Actual:

ValidationError: 1 validation error for Data
                             data
                               Input should be a valid dictionary [type=dict_type,
                             input_value='{', input_type=str]
                                 For further information visit
                             https://errors.pydantic.dev/2.10/v/dict_type

Who can help?

No response

Operating System

Mac

Langflow Version

1.1.3

Python Version

3.12

Screenshot

No response

Flow File

No response

@mukundha mukundha added the bug Something isn't working label Feb 12, 2025
@dosubot dosubot bot added the enhancement New feature or request label Feb 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant