You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
There's an uncaught KeyError when the batchCreate endpoint returns errors.
Traceback (most recent call last):
File "/home/user/project/venv/lib/python3.7/site-packages/celery/app/trace.py", line 385, in trace_task
R = retval = fun(*args, **kwargs)
File "/home/user/project/venv/lib/python3.7/site-packages/celery/app/trace.py", line 650, in __protected_call__
return self.run(*args, **kwargs)
File "/home/user/project/dispatch/tasks.py", line 18, in create_onfleet_tasks_from_run
create_count, error_list = models.RunStop.tasks.batch_create(stops)
File "/home/user/project/_onfleet/models.py", line 45, in batch_create
response = api.tasks.batchCreate(body=dict(tasks=task_list))
File "/home/user/project/venv/lib/python3.7/site-packages/backoff/_sync.py", line 94, in retry
ret = target(*args, **kwargs)
File "/home/user/project/venv/lib/python3.7/site-packages/ratelimit/decorators.py", line 80, in wrapper
return func(*args, **kargs)
File "/home/user/project/venv/lib/python3.7/site-packages/onfleet/request.py", line 62, in __call__
error_request = error['message']['request']
KeyError: 'request'
To Reproduce
I had thought it was due to an error with the address but just retried the API call and it was completed successfully.
I've run into a similar problem with large batches but in this case the body only contained 10 tasks.
Expected behavior
A clear and concise description of what you expected to happen.
Screenshots
If applicable, add screenshots to help explain your problem.
Additional context
v1.2
The text was updated successfully, but these errors were encountered:
wooooodward
changed the title
[BUG] KeyError: '
[BUG] "request" KeyError when batchCreate results in errors'
Oct 12, 2021
wooooodward
changed the title
[BUG] "request" KeyError when batchCreate results in errors'
[BUG] KeyError when batchCreate results in errors
Oct 12, 2021
Describe the bug
There's an uncaught
KeyError
when thebatchCreate
endpoint returns errors.To Reproduce
I had thought it was due to an error with the address but just retried the API call and it was completed successfully.
I've run into a similar problem with large batches but in this case the body only contained 10 tasks.
Expected behavior
A clear and concise description of what you expected to happen.
Screenshots
If applicable, add screenshots to help explain your problem.
Additional context
v1.2
The text was updated successfully, but these errors were encountered: