Skip to content

Fix "LoadError: cannot load such file" everywhere - Remove dynamic requiring for API methods #323

Description

@rusikf

Hi Hubspot Team!

On calling most API methods with invalid params We don't have validation because of dynamic requiring files
Idea 馃挕 - Can we remove the dynamic code required?

The ability to see the raw backtrace/logs/validation errors is much better than LoadError

Note: Everything works if pass valid parameters.

hubspot_client.crm.associations.v4.basic_api.create(object_type: 'CONTACT', object_id: nil)
# LoadError: cannot load such file -- hubspot/codegen/crm/associations/v4/models/object_id
hubspot_client.crm.associations.v4.basic_api.create
# LoadError: cannot load such file -- hubspot/codegen/crm/associations/v4/models/object_type
hubspot_client.crm.contacts.basic_api.update
# LoadError: cannot load such file -- hubspot/codegen/crm/contacts/models/contact_id

Thanks!

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions