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

SAP SuccessFactors Learning Management

Resolution

  • When you set operationStatusDetail to true, you return error information. When you set it to false, you do not return error information.
  • 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}]}}}

See Also

Please refer SAP Help Portal for additional information.

Learning oData API Reference Guide

Keywords

SF ,success factors ,LMS , Error code , webservices , oData , KBA , LOD-SF-LMS-ODA , Web Services OData , Problem

Product

SAP SuccessFactors Learning all versions