Avatar

Getting DuplicateException when adding a driver change, what's the issue?

0
A Geotab error has occurred.
        Name: DuplicateException
        Message: Duplicate Data
        Database: flexport_1987_1530564847
        Request index: 0
        API request: {"method":"Add","params":{"typeName":"DriverChange","entity":{"dateTime":"2019-01-03T23:04:19.173Z","device":{"id":"b1"},"driver":{"id":"UnknownDriverId"},"type":"Driver"},"credentials":{"database":"flexport_1987_1530564847","userName":"fivestardemo"}}}

The error message looks like this, I am confused by the message since there is no id in the API params.
Yingfu

Please sign in to leave a comment.

2 comments

0
Avatar

Hi Ying,

Thanks for reaching out! DriverChange records are unique based on DateTime and Device. Error message means, there is already an entry in the database with those values. 

Hope this helps!

 

Sailaja Palakodeti 0 votes
0
Avatar

We are still having problem:

GeotabClient::Error: Duplicate Data

        A Geotab error has occurred.
        Name: DuplicateException
        Message: Duplicate Data
        Database: flexport_1923_1506098918
        Request index: 0
        API request: {"method":"Add","params":{"typeName":"DriverChange","entity":{"dateTime":"2019-02-08T17:47:17.287Z","device":{"id":"b1"},"driver":{"id":"b17"},"type":"Driver"},"credentials":{"database":"flexport_1923_1506098918","userName":"0954"}}}
      

But there is no existing record has the same date time and device/driver id

Yingfu 0 votes