# HG changeset patch # User Sebastien Jodogne # Date 1466695921 -7200 # Node ID 0f35383dd6cc2c521fff69b6c4d78b0e921e3eef # Parent 35ccba7adae954df41913ecac8d1e38d6bf1c76a doc diff -r 35ccba7adae9 -r 0f35383dd6cc Core/HttpClient.cpp --- a/Core/HttpClient.cpp Thu Jun 23 10:08:27 2016 +0200 +++ b/Core/HttpClient.cpp Thu Jun 23 17:32:01 2016 +0200 @@ -189,7 +189,7 @@ throw OrthancException(ErrorCode_Unauthorized); case HttpStatus_404_NotFound: - throw OrthancException(ErrorCode_InexistentItem); + throw OrthancException(ErrorCode_UnknownResource); default: throw OrthancException(ErrorCode_NetworkProtocol); @@ -197,7 +197,6 @@ } - static CURLcode CheckCode(CURLcode code) { if (code == CURLE_NOT_BUILT_IN) diff -r 35ccba7adae9 -r 0f35383dd6cc Plugins/Include/orthanc/OrthancCPlugin.h --- a/Plugins/Include/orthanc/OrthancCPlugin.h Thu Jun 23 10:08:27 2016 +0200 +++ b/Plugins/Include/orthanc/OrthancCPlugin.h Thu Jun 23 17:32:01 2016 +0200 @@ -1569,6 +1569,7 @@ * @param target The target memory buffer. It must be freed with OrthancPluginFreeMemoryBuffer(). * @param uri The URI in the built-in Orthanc API. * @return 0 if success, or the error code if failure. + * @note If the resource is not existing (error 404), the error code will be OrthancPluginErrorCode_UnknownResource. * @see OrthancPluginRestApiGetAfterPlugins * @ingroup Orthanc **/ @@ -1598,6 +1599,7 @@ * @param target The target memory buffer. It must be freed with OrthancPluginFreeMemoryBuffer(). * @param uri The URI in the built-in Orthanc API. * @return 0 if success, or the error code if failure. + * @note If the resource is not existing (error 404), the error code will be OrthancPluginErrorCode_UnknownResource. * @see OrthancPluginRestApiGet * @ingroup Orthanc **/ @@ -1634,6 +1636,7 @@ * @param body The body of the POST request. * @param bodySize The size of the body. * @return 0 if success, or the error code if failure. + * @note If the resource is not existing (error 404), the error code will be OrthancPluginErrorCode_UnknownResource. * @see OrthancPluginRestApiPostAfterPlugins * @ingroup Orthanc **/ @@ -1668,6 +1671,7 @@ * @param body The body of the POST request. * @param bodySize The size of the body. * @return 0 if success, or the error code if failure. + * @note If the resource is not existing (error 404), the error code will be OrthancPluginErrorCode_UnknownResource. * @see OrthancPluginRestApiPost * @ingroup Orthanc **/ @@ -1696,6 +1700,7 @@ * @param context The Orthanc plugin context, as received by OrthancPluginInitialize(). * @param uri The URI to delete in the built-in Orthanc API. * @return 0 if success, or the error code if failure. + * @note If the resource is not existing (error 404), the error code will be OrthancPluginErrorCode_UnknownResource. * @see OrthancPluginRestApiDeleteAfterPlugins * @ingroup Orthanc **/ @@ -1718,6 +1723,7 @@ * @param context The Orthanc plugin context, as received by OrthancPluginInitialize(). * @param uri The URI to delete in the built-in Orthanc API. * @return 0 if success, or the error code if failure. + * @note If the resource is not existing (error 404), the error code will be OrthancPluginErrorCode_UnknownResource. * @see OrthancPluginRestApiDelete * @ingroup Orthanc **/ @@ -1742,6 +1748,7 @@ * @param body The body of the PUT request. * @param bodySize The size of the body. * @return 0 if success, or the error code if failure. + * @note If the resource is not existing (error 404), the error code will be OrthancPluginErrorCode_UnknownResource. * @see OrthancPluginRestApiPutAfterPlugins * @ingroup Orthanc **/ @@ -1777,6 +1784,7 @@ * @param body The body of the PUT request. * @param bodySize The size of the body. * @return 0 if success, or the error code if failure. + * @note If the resource is not existing (error 404), the error code will be OrthancPluginErrorCode_UnknownResource. * @see OrthancPluginRestApiPut * @ingroup Orthanc **/