Skip to content

upload_entries does not exit on server error (500) #54

@tonnitommi

Description

@tonnitommi

When uploading data, for example:

upload_entries(aito_client, table_name=tablename, entries=entries, batch_size=25)

the process does not exit in the case Aito API returns HTTP status 500, for example:

INFO:AitoAPI:uploading entries to table `cleaned_data` with batch size of 25...
DEBUG:AitoAPI:uploading batch 0:25...
DEBUG:urllib3.connectionpool:Starting new HTTPS connection (1): very-specific-bug.predictive.rocks:443
DEBUG:urllib3.connectionpool:https://very-specific-bug.predictive.rocks:443 "POST /api/v1/data/cleaned_data/batch HTTP/1.1" 500 35
ERROR:AitoAPI:batch 0:25 failed: Expecting value: line 1 column 1 (char 0)
DEBUG:AitoAPI:uploading batch 25:50...
DEBUG:urllib3.connectionpool:Starting new HTTPS connection (1): very-specific-bug.predictive.rocks:443
DEBUG:urllib3.connectionpool:https://very-specific-bug.predictive.rocks:443 "POST /api/v1/data/cleaned_data/batch HTTP/1.1" 500 35
ERROR:AitoAPI:batch 25:50 failed: Expecting value: line 1 column 1 (char 0)
DEBUG:AitoAPI:uploading batch 50:75...

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions