Skip to content

CloudForCustomers connector - error handling in to_df method #853

@winiar93

Description

@winiar93

I discovered that method to_df from the CloudForCustomers connector class doesn't handle the situation where the method returns an empty data frame. If there are no results, a very generic error will be raised- KeyError.
Moreover, if a field argument is provided c4c.to_df(fields=['a', 'b']) and field a doesn't exist in c4c there will be also KeyError.

As a result of this, we have the same generic error ( KeyError ) in two different cases.
Raising KeyError where there are empty results, I consider as a bug.

As a fix please consider implementing two different kinds of errors with proper messages.

Metadata

Metadata

Labels

bugSomething isn't workingenhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions