Can you please tell me what the intention of these two error codes are:
Do they mean that the driver went to look for the address but physically could not find them, or something more like the address given to the system could not be found in the database, etc? Is this an error we would expect to see upon creating a job, or something that could happen once the driver is already in progress?
These are errors you can expect to see as response of Job creation when the pickup address or dropoff address you provide cannot be geocoded. This will prevent the job creation as addresses are required parameters.
To avoid these addresses errors we recommend you to use Google autocomplete API for addresses (format will be 100% valid as we use Google Geocoding).
Also, are all of the error codes available in the system listed in the docs (https://stuart.api-docs.io/v2/general-topics/errors)?
I am wondering because it seems there are some differences between v1 and v2?
For example, in our earlier code, we are handling:
But I don’t see these in the list of errors in the docs. There are other also, and I wonder where they might be found?
In v1 API, they were coded for error 422000, and I can’t find those in the v1 or v2 docs either.
Thanks for your help!
Many thanks @Lauren! Can you please point me a list of other error codes we can expect to encounter during job creation or updating?
The documented error list is the one you mentioned: https://stuart.api-docs.io/v2/general-topics/errors
Some errors might be missing, we will have a look at this but in the meantime if you encounter one that is not listed you should fall back to the HTTP status code to handle it correctly.
The 3 errors about the contact phone you mentioned are indeed 422000 errors that are documented in the Responses section of the Create a Job endpoint.
Hi @Lauren, can you please confirm that these are address related errors that we can expect to encounter on job creation, and not error codes that we would see while the job is being processed and delivered by the courier:
The best way for handling errors is to share with me the list of business rules you have so I can redirect you to the correct process and error messages.
What we would love to do is to handle 422 errors and based on what the error is, possibly make adjustments to whatever needs it and retry the create job until it either is accepted or we’ve run out of options to correct something.
One thing we were handling in v1 was the error “JOB_DELIVERIES_INVALID” and are checking on our side if the job had already been created. For v2, I imagine that status for that is “DUPLICATE_JOB”, is that right?
We were also handling “PLACE_ADDRESS_INVALID” and “JOB_DESTINATION_ADDRESS_INVALID”
Also, “JOB_DESTINATION_CONTACT_PHONE_INVALID” “PLACE_CONTACT_PHONE_INVALID” “PLACE_CONTACT_PHONE_MISSING”
So if we can know the error codes to watch for to handle addresses and phones, that’d be awesome.
Can you please let me know?
In V2 when you create a Job with a
client_reference we will check if there is another running job with it.
If you try to create a Job that has already been created with the same
client_reference we will prevent the job creation and send the following 422 error :
"message": "Unable to save record",
"Client reference: \"your_client_reference\" has already been taken"
The “PLACE_ADDRESS_INVALID” and “JOB_DESTINATION_ADDRESS_INVALID” will be one of the following errors:
"message": "The address can't be geocoded"
If the address is not in the Stuart delivery zone coverage:
"message": "This location is out of range."
If the delivery exceeds the maximum distance allowed:
"message": "Price calculation for bike in Paris with distance 57.648 km is out of bounds."
When the pickup or dropoff address is not precise enough we will required the corresponding contact phone
"message": "Contact phone is required."
If the phone number is invalid:
"message": "Unable to save record",
"Origin place: can't be blank",
"Origin place: Contact phone: \"+3361010101010\" is an invalid number"
Thank you very much @Lauren