Web API exception or error handling
- Last UpdatedOct 06, 2022
- 1 minute read
AVEVA™ Production Management Web API request returns standard exception messages when validation or business error occurs to a specific Web API. The error message is standard across all modules, and the details provided can help a user take corrective measures accordingly.
The message includes the following details:
-
Message and Exception Message
-
Exception Type
-
Action Name
-
Controller Name
-
Error Status Code
-
Parameters Provided
Example
{
"Message": "A business error has occurred.
The location 'EnterpriseFolder.DowntimeReportingPoint2' is not valid for
module 'Downtime'. Please ensure the location exists in the project. The
requesting user must also have permission to view the specified
location.",
"ExceptionMessage": "A business error has occurred.
The location 'EnterpriseFolder.DowntimeReportingPoint2' is not valid for
module 'Downtime'. Please ensure the location exists in the project. The
requesting user must also have permission to view the specified
location.",
"ExceptionType": "System.ServiceModel.FaultException`1
[Citect.Ampla.Public.WebService.Data.V200806.BusinessErrors]",
"ActionName": "GetRecords",
"ControllerName": "Data",
"ErrorStatusCode": "500",
"Parameters Provided": [
{
"Key": "module",
"Value": "Downtime"
},
{
"Key": "Location",
"Value": "EnterpriseFolder.DowntimeReportingPoint2"
}
]
}