SAP Knowledge Base Article - Public

2701325 - How to set LMS web service call to get error codes.

Symptom

In some SAP SuccessFactors Learning web services, you can set a parameter in your web service call to get error codes.

Environment

SuccessFactors Learrning , Learning Management System

Resolution

When you set operationStatusDetail to true, you return error information. When you set it to false, you do not return error information.

NOTE : In some SAP SuccessFactors Learning web services like add user etc, you can set this parameter in your web service call to get error codes.

operationStatusDetail=true

Example : If you are calling an user creation API to create a user . If the user is already available in the system then API will throw some error code like '500' etc. which is difficult to understand the exact issue.

If the above property is not set to true , When you call for errors, and the web service returns an error, it returns a JSON structure.

Sample Error Response :

{
"error": {
"code": null,
"message": "Failed to create user as the user id Yb-1234 already exists.",
"operationStatusDetail": {
"status": "FAILED",
"operation": null,
"warnings": [],
"errors": [
{
"code": "500",
"message": "Failed to create user as the user id Yb-1234 already exists.",
"fieldName": null
}
]
}
}
}

Keywords

operationStatusDetail , Error code , webservices , API How to set LMS web service call to get error codes. , KBA , LOD-SF-LMS-ODA , LMS Web Services OData , Problem

Product

SAP SuccessFactors Learning all versions