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

Error handling sometimes returns empty objects #448

Open
DnOberon opened this issue Sep 23, 2024 · 0 comments
Open

Error handling sometimes returns empty objects #448

DnOberon opened this issue Sep 23, 2024 · 0 comments

Comments

@DnOberon
Copy link
Collaborator

Bug Description

Even when an error is present, error handling returns an empty object due to the way errors are cast and returned.

Steps to Reproduce

Attempt to update an HTTP data source with no username/pass or no token. You will get an error back of {}. If you add a console.log(err) statement to the catch block in data_source_routes under the updateDataSource function, you will see that the following error is returned:
image
However, due to the formatting of the Error function not matching the format of this error, nothing is returned to the end user.

Impact

Better error handling will impact the frontend and API user. I'm imagining this fix can be handled by digging into the result.ts file and making some changes there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant