# HG changeset patch # User Sebastien Jodogne # Date 1617194081 -7200 # Node ID de5e6b04442d02795996b0ab60511b1ff5190dda # Parent f75c63aa9de0b1cca20e23f264979e0797244e03 added ErrorCode_Revision diff -r f75c63aa9de0 -r de5e6b04442d OrthancFramework/Resources/CodeGeneration/ErrorCodes.json --- a/OrthancFramework/Resources/CodeGeneration/ErrorCodes.json Tue Mar 30 18:10:27 2021 +0200 +++ b/OrthancFramework/Resources/CodeGeneration/ErrorCodes.json Wed Mar 31 14:34:41 2021 +0200 @@ -239,6 +239,12 @@ "Name": "DatabaseCannotSerialize", "Description": "Database could not serialize access due to concurrent update, the transaction should be retried" }, + { + "Code": 43, + "HttpStatus": 409, + "Name": "Revision", + "Description": "A bad revision number was provided, indicates conflict between multiple updates" + }, diff -r f75c63aa9de0 -r de5e6b04442d OrthancFramework/Sources/Enumerations.cpp --- a/OrthancFramework/Sources/Enumerations.cpp Tue Mar 30 18:10:27 2021 +0200 +++ b/OrthancFramework/Sources/Enumerations.cpp Wed Mar 31 14:34:41 2021 +0200 @@ -190,6 +190,9 @@ case ErrorCode_DatabaseCannotSerialize: return "Database could not serialize access due to concurrent update, the transaction should be retried"; + case ErrorCode_Revision: + return "A bad revision number was provided, indicates conflict between multiple updates"; + case ErrorCode_SQLiteNotOpened: return "SQLite: The database is not opened"; @@ -2147,6 +2150,9 @@ case ErrorCode_DatabaseCannotSerialize: return HttpStatus_503_ServiceUnavailable; + case ErrorCode_Revision: + return HttpStatus_409_Conflict; + case ErrorCode_CreateDicomNotString: return HttpStatus_400_BadRequest; diff -r f75c63aa9de0 -r de5e6b04442d OrthancFramework/Sources/Enumerations.h --- a/OrthancFramework/Sources/Enumerations.h Tue Mar 30 18:10:27 2021 +0200 +++ b/OrthancFramework/Sources/Enumerations.h Wed Mar 31 14:34:41 2021 +0200 @@ -136,6 +136,7 @@ ErrorCode_DiscontinuedAbi = 40 /*!< Calling a function that has been removed from the Orthanc Framework */, ErrorCode_BadRange = 41 /*!< Incorrect range request */, ErrorCode_DatabaseCannotSerialize = 42 /*!< Database could not serialize access due to concurrent update, the transaction should be retried */, + ErrorCode_Revision = 43 /*!< A bad revision number was provided, indicates conflict between multiple updates */, ErrorCode_SQLiteNotOpened = 1000 /*!< SQLite: The database is not opened */, ErrorCode_SQLiteAlreadyOpened = 1001 /*!< SQLite: Connection is already open */, ErrorCode_SQLiteCannotOpen = 1002 /*!< SQLite: Unable to open the database */, diff -r f75c63aa9de0 -r de5e6b04442d OrthancServer/Plugins/Include/orthanc/OrthancCPlugin.h --- a/OrthancServer/Plugins/Include/orthanc/OrthancCPlugin.h Tue Mar 30 18:10:27 2021 +0200 +++ b/OrthancServer/Plugins/Include/orthanc/OrthancCPlugin.h Wed Mar 31 14:34:41 2021 +0200 @@ -240,6 +240,7 @@ OrthancPluginErrorCode_DiscontinuedAbi = 40 /*!< Calling a function that has been removed from the Orthanc Framework */, OrthancPluginErrorCode_BadRange = 41 /*!< Incorrect range request */, OrthancPluginErrorCode_DatabaseCannotSerialize = 42 /*!< Database could not serialize access due to concurrent update, the transaction should be retried */, + OrthancPluginErrorCode_Revision = 43 /*!< A bad revision number was provided, indicates conflict between multiple updates */, OrthancPluginErrorCode_SQLiteNotOpened = 1000 /*!< SQLite: The database is not opened */, OrthancPluginErrorCode_SQLiteAlreadyOpened = 1001 /*!< SQLite: Connection is already open */, OrthancPluginErrorCode_SQLiteCannotOpen = 1002 /*!< SQLite: Unable to open the database */, diff -r f75c63aa9de0 -r de5e6b04442d OrthancServer/Sources/main.cpp --- a/OrthancServer/Sources/main.cpp Tue Mar 30 18:10:27 2021 +0200 +++ b/OrthancServer/Sources/main.cpp Wed Mar 31 14:34:41 2021 +0200 @@ -724,6 +724,7 @@ PrintErrorCode(ErrorCode_DiscontinuedAbi, "Calling a function that has been removed from the Orthanc Framework"); PrintErrorCode(ErrorCode_BadRange, "Incorrect range request"); PrintErrorCode(ErrorCode_DatabaseCannotSerialize, "Database could not serialize access due to concurrent update, the transaction should be retried"); + PrintErrorCode(ErrorCode_Revision, "A bad revision number was provided, indicates conflict between multiple updates"); PrintErrorCode(ErrorCode_SQLiteNotOpened, "SQLite: The database is not opened"); PrintErrorCode(ErrorCode_SQLiteAlreadyOpened, "SQLite: Connection is already open"); PrintErrorCode(ErrorCode_SQLiteCannotOpen, "SQLite: Unable to open the database");