Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

This document explains about the various error responses the inQuiry micro service currently throws. The intent of this document is to look through the errors and classify it and propose any changes in terms of error reporting.

...

Expand
titleClientException
Code Block
languagejava
Class
    ServerExceptionClientException
Usages in All Places  (56 usages found)
    Local variable declaration  (1 usage found)
        Maven: org.sunbird:platform-common:1.0-SNAPSHOT assessment-actors  (131 usageusages found)
            org.sunbird.common.exceptionmanagers  (126 usageusages found)
                ServerExceptionTestAssessmentManager.scala  (122 usageusages found)
                    34 testServerException_6()throw new ClientException(1errCode, usage"Visibility found)cannot be Parent!")
                    53  37 ServerException exception =  throw new ServerExceptionClientException(ErrorCodes."ERR_SYSTEM_EXCEPTION.name()ACCESS_DENIED", s"Failed$resName tovisibility createis nodeprivate, object.hence Nodeaccess fromdenied")
database is null.", new Throwable("message throwable"));     New instance creation  (30 usages found)    61     assessment-actors  (3 usages found)
     if (StringUtils.isBlank(request.getRequest.getOrDefault("channel", "").asInstanceOf[String])) throw new ClientException("ERR_INVALID_CHANNEL", "Please Provide Channel!")
      org.sunbird.managers  (3 usages found)          69 throw new ClientException("ERR_ACCESS_DENIED", "Channel id is AssessmentManager.scala  (1 usage foundnot matched")
                    20783 }throw else throw new ServerException("ERR_QUESTION_SET_HIERARCHYnew ClientException(errCode, node.getMetadata.getOrDefault("objectType", "").asInstanceOf[String].replace("Image", "No") hierarchy+ is" presentwith invisibility cassandra for identifier:" + rootNode.getIdentifierParent, can't be updated individually.")
                CopyManager.scala  (2 usages found    92 throw new ClientException(errCode, s"${node.getObjectType.replace("Image", "")} with visibility Parent, can't be sent for review individually.")
                    10794 throw new ServerException("ERR_QUESTIONSET_COPY ClientException(errCode, s"${node.getObjectType.replace("Image", "Something Went Wrong, Please Try Again")} with status other than Draft can't be sent for review.")
                    116107 throw new ServerException("ERR_QUESTIONSET_COPYClientException(errCode, s"${node.getObjectType.replace("Image", "Something Went Wrong, Please Try Again")} with visibility Parent, can't be sent for review individually.")
        qs-hierarchy-manager  (4 usages found)        109 throw new   org.sunbird.managers  (4 usages found)
                HierarchyManager.scala  (3 usages foundClientException(errCode, s"${node.getObjectType.replace("Image", "")} with status other than Draft can't be sent for review.")
                    488112 throw new ServerExceptionClientException("ERR_WHILEMANDATORY_FETCHING_HIERARCHY_FROM_CASSANDRAFIELD_VALIDATION", s"Error while fetching hierarchy from cassandraMandatory Fields ${messages.asJava} Missing for ${node.getIdentifier.replace(".img", "")}")
                    493139 throw new ServerException("ERR_WHILE_FETCHING_HIERARCHY_FROM_CASSANDRAClientException(errCode, s"${node.getObjectType.replace("Image", "Error while fetching hierarchy from cassandra")} with visibility Parent, can't be sent for publish individually.")
                    575141 throw new ServerExceptionClientException("SERVER_ERRORerrCode, s"${node.getObjectType.replace("Image", "Invalid response from search")} having Processing status can't be sent           UpdateHierarchyManager.scala  (1 usage foundfor publish.")
                    128152 throw new ServerException(HierarchyErrorCodes.ERR_HIERARCHY_NOT_FOUND, "No hierarchy is present in cassandra for identifier:" + rootNode.getIdentifierClientException(errCode, s"${node.getObjectType.replace("Image", "")} with visibility Parent, can't be sent for publish individually.")
        Maven: org.sunbird:graph-engine_2.11:1.0-SNAPSHOT  (9 usages found)         154 throw new  src.main.scala.org.sunbird.graph.external.store  (5 usages found)
                ExternalStore.scala  (5 usages foundClientException(errCode, s"${node.getObjectType.replace("Image", "")} having Processing status can't be sent for publish.")
                    49157 throw new ServerExceptionClientException(ErrorCodes."ERR_SYSTEM_EXCEPTION.nameMANDATORY_FIELD_VALIDATION", s"ExceptionMandatory Occurred While Saving The Record. Exception is : " + e.getMessageFields ${messages.asJava} Missing for ${node.getIdentifier.replace(".img", "")}")
                    92165 throw new ServerException(ErrorCodes.ERR_SYSTEM_EXCEPTION.name, "Exception Occurred While Reading The Record. Exception is : " + e.getMessageClientException(errCode, s"${node.getObjectType.replace("Image", "")} with identifier : ${node.getIdentifier} is already Retired.")
                    110174 throw new ServerException(ErrorCodes.ERR_SYSTEM_EXCEPTION.name, "Exception Occurred While Reading The Record. Exception is : " + e.getMessageClientException(errCode, s"${node.getObjectType.replace("Image", "")} with visibility Parent, can't be sent for reject individually.")
                    150176 throw new ServerException(ErrorCodes.ERR_SYSTEM_EXCEPTION.name, "Exception Occurred While Reading The Record. Exception is ClientException(errCode, s"${node.getObjectType.replace("Image", "")} is not in 'Review' state for identifier: " + enode.getMessagegetIdentifier)
                    181185 throw new ServerExceptionClientException(ErrorCodes."ERR_SYSTEM_EXCEPTION.nameQUESTION_SET_ADD", "ExceptionNode Occurred While Saving The Record. Exception is :with Identifier " + enode.getMessage)getIdentifier + " is not a Question Set")
     src.main.scala.org.sunbird.graph.relations  (2 usages found)            216 throw new ClientException("ERR_QUESTION_SET",  AbstractRelation.scala  (1 usage found"Object with identifier: " + content.get("identifier") + " is not Live. Please Publish it.")
                    66237 throw new ServerExceptionClientException(GraphErrorCodes."ERR_RELATION_VALIDATE.toStringMANDATORY_FIELD_VALIDATION", s"ErrorMandatory occurred while validating the relation", e)Fields ${messages.asJava} Missing for ${content.get("identifier").toString}")
                    SequenceMembershipRelation.scala284 if (1 usage found)
    (StringUtils.isBlank(beJobRequestEvent)) throw new ClientException("BE_JOB_REQUEST_EXCEPTION", "Event is not generated properly.")
               25 throwCopyManager.scala new ServerException(GraphErrorCodes.ERR_RELATION_VALIDATE.toString, e.getMessage, e(4 usages found)
            src.main.scala.org.sunbird.graph.schema    (1 usage found)  61 requestObjectType, nodeObjectType)) throw            CategoryDefinitionValidator.scala  (1 usage found)
new ClientException(AssessmentConstants.ERR_INVALID_OBJECT_TYPE, s"Please Provide Valid ${requestObjectType} Identifier
                   65 } else63 throw new ServerExceptionClientException(resp.getParams.getErr, resp.getParams.getErrmsg + " " + resp.getResult)
   AssessmentConstants.ERR_INVALID_REQUEST, "Question With Visibility Parent Cannot Be Copied Individually!")
        src.main.scala.org.sunbird.graph.schema.validator  (1 usage found)        270 throw new ClientException(AssessmentConstants.ERR_INVALID_REQUEST, "Please provide valid value for FrameworkValidator.scala"  (1 usage found+ keysNotPresent)
                    152276 throw new ServerExceptionClientException("AssessmentConstants.ERR_GRAPH_PROCESSING_ERROR",INVALID_REQUEST, "UnableQuestionSet To Fetch Nodes From Graph. Exception is:With Status " + e.getMessage)
        Maven: org.sunbird:platform-common:1.0-SNAPSHOT  (13 usages found)node.getMetadata.get(AssessmentConstants
             org.sunbird.commonutils  (75 usages found)
                HttpUtilRequestUtil.scala  (75 usages found)
                    24 getRequest.containsKey(prop))) throw new post(String, Map<String, Object>, Map<String, String>)  (2 usages found)
   ClientException("ERROR_RESTRICTED_PROP", "Properties in list " + restrictedProps.mkString("[", ", ", "]") + " are not
                    3329 throw new ServerExceptionClientException("ErrorCodes.ERR_INVALIDBAD_REQUEST_BODY".name(), s"Request Body cannot isbe Missing!Empty.");
                        3832 throw new ServerExceptionClientException("ErrorCodes.ERR_API_CALL"BAD_REQUEST.name(), s"SomethingCannot Wentupdate Wrongcontent Whilestatus Makingto API Call | Error is: " + e.getMessage());: ${SYSTEM_UPDATE_ALLOWED_CONTENT_STATUS.mkString("[", ", ", "]")}.")
                    get(String, String, Map<String, String>)  (1 usage found)
  38 throw new ClientException(ErrorCodes.ERR_BAD_REQUEST.name(), "Required field identifier is missing or empty.")
                     5841 throw new ServerExceptionClientException("ErrorCodes.ERR_API_CALL"BAD_REQUEST.name(), "SomethingRequest Wentcontains Wrongmore Whilethan Makingthe APIpermissible Calllimit |of Error isidentifiers: " + e.getMessage());
     reqSize + ". Permissible limit is: "+questionListLimit)
        qs-hierarchy-manager  (24 usages found)
  getMetadata(String, Map<String, String>)          org.sunbird.managers  (124 usageusages found)
                HierarchyManager.scala  (11 usages found)
                84    124 throw new ServerExceptionClientException("ERR_APIBRANCHING_CALLLOGIC", s"SomethingBranching Is WentNot WrongEnabled While Making API Call | Error is: " + e.getMessage());For ${rootNode.getIdentifier}. Please Enable Branching Or Remove branchingLogic from Request.")
                    validateRequest(String, Map<String, String>)  (2 usages found)
  255 throw new ClientException(ErrorCodes.ERR_BAD_REQUEST.name(), "rootId is mandatory")
                    258 90 throw new ServerExceptionClientException("ErrorCodes.ERR_INVALID_URL"BAD_REQUEST.name(), "Urlchildren Parameter is Missing!are mandatory");
                    262 throw   92 throw new ServerException("ERR_INVALID_HEADER_PARAM", "Header Parameter is Missing!");new ClientException(ErrorCodes.ERR_BAD_REQUEST.name(), "Branch Rule Found For The Node Which Is Not A Children Having Identifier
                    281 throw  getResponse(HttpResponse<String>)  (1 usage found)
   new ClientException(ErrorCodes.ERR_BAD_REQUEST.name(), "Children which are not available are: " + filteredList)
                    100285 throw new ServerExceptionClientException("ErrorCodes.ERR_DATA_PARSER"BAD_REQUEST.name(), s"UnableChildren must tobe parseof data! | Error is: " + e.getMessage());
  types $ASSESSMENT_OBJECT_TYPES for ids:  ${invalidNodes.map(_.getIdentifier)}")
         org.sunbird.common.exception  (6 usages found)       320 throw         ServerExceptionTest  (6 usages found)
                    testServerException_1()  (1 usage found)new ClientException("ERR_BRANCHING_LOGIC", s"Branching Is Not Enabled For ${unitId}. Please Enable Branching Or Remove branchingLogic from Request.")
                          11 696 throw new ServerException(ResponseCode.SERVER_ERROR.name(), "Failed to create node object. Node from database is null.");
                    testServerException_2()  (1 usage foundClientException("ERR_BRANCHING_LOGIC", s"Dependent Children Found! Please Remove Children With Identifiers ${target} For Node : ${identifier}")
                    708    16 throw new ServerExceptionClientException(ErrorCodes."ERR_SYSTEM_EXCEPTION.name(), "Failed to create node object. Node from database is null.BRANCHING_LOGIC", Arrays.asList("Message one ", "message 2"));
                    testServerException_3()  (1 usage found)
                        21 throw new ServerException(ErrorCodes.ERR_SYSTEM_EXCEPTION.name(), "Failed to create node object. Node from database is null.", "message1", "message2");
                    testServerException_4()  (1 usage found)
                        26 throw new ServerException(ErrorCodes.ERR_SYSTEM_EXCEPTION.name(), "Failed to create node object. Node from database is null.", new Throwable("message throwable"), "message1", "message2");
                    testServerException_5()  (1 usage found)
                        32 throw new ServerException(ErrorCodes.ERR_SYSTEM_EXCEPTION.name(), "Failed to create node object. Node from database is null.", new Throwable("message throwable"));
                    testServerException_6()  (1 usage found)
                        37 ServerException exception =  new ServerException(ErrorCodes.ERR_SYSTEM_EXCEPTION.name(), "Failed to create node object. Node from database is null.", new Throwable("message throwable"));
        Maven: org.sunbird:schema-validator:1.0-SNAPSHOT  (1 usage found)
            org.sunbird.schema  (1 usage found)
                SchemaValidatorFactory  (1 usage found)
                    getExternalStoreName(String, String)  (1 usage found)
                        39 throw new ServerException("ERR_KEYSPACE_NOT_DEFINED", "Key space for " + name + " is not configured.");
    Usage in .class  (10 usages found)
        Maven: org.sunbird:platform-common:1.0-SNAPSHOT  (9 usages found)
            org.sunbird.common  (4 usages found)
                HttpUtilTest  (4 usages found)
                    testValidateRequestWithEmptyUrl()  (1 usage found)
                        50 @Test(expected = ServerException.class)
                    testValidateRequestWithEmptyHeader()  (1 usage found)
                        60 @Test(expected = ServerException.class)
                    testPostWithInvalidRequest()  (1 usage found)
                        93 @Test(expected = ServerException.class)
                    testGetResponseWithInvalidBody()  (1 usage found)
                        140 @Test(expected = ServerException.class)
            org.sunbird.common.exception  (5 usages found)
                ServerExceptionTest  (5 usages found)
                    testServerException_1()  (1 usage found)
                        9 @Test(expected = ServerException.class)
                    testServerException_2()  (1 usage found)
                        14 @Test(expected = ServerException.class)
                    testServerException_3()  (1 usage found)
                        19 @Test(expected = ServerException.class)
                    testServerException_4()  (1 usage found)
                        24 @Test(expected = ServerException.class)
                    testServerException_5()  (1 usage found)
                        30 @Test(expected = ServerException.class)
        Maven: org.sunbird:schema-validator:1.0-SNAPSHOT  (1 usage found)
            org.sunbird.schema  (1 usage found)
                TestSchemaValidatorFactory  (1 usage found)
                    getExternalStoreNameInvalid()  (1 usage found)
                        44 @Test(expected = ServerException.class)
    Usage in import  (14 usages found)
        assessment-actors  (2 usages found)
            org.sunbird.managers  (2 usages found)
                AssessmentManager.scala  (1 usage found)
                    8 import org.sunbird.common.exception.{ClientException, ResourceNotFoundException, ServerException}
                CopyManager.scala  (1 usage found)
                    8 import org.sunbird.common.exception.{ClientException, ServerException}
        qs-hierarchy-manager  (2 usages found)
            org.sunbird.managers  (2 usages found)
                HierarchyManager.scala  (1 usage found)
                    10 import org.sunbird.common.exception.{ClientException, ErrorCodes, ResourceNotFoundException, ResponseCode, ServerException}
                UpdateHierarchyManager.scala  (1 usage found)
                    9 import org.sunbird.common.exception.{ClientException, ErrorCodes, ResourceNotFoundException, ServerException}
        Maven: org.sunbird:graph-engine_2.11:1.0-SNAPSHOT  (5 usages found)
            src.main.scala.org.sunbird.graph.external.store  (1 usage found)
                ExternalStore.scala  (1 usage found)
                    14 import org.sunbird.common.exception.{ErrorCodes, ResponseCode, ServerException}
            src.main.scala.org.sunbird.graph.relations  (2 usages found)
                AbstractRelation.scala  (1 usage found)
                    5 import org.sunbird.common.exception.{MiddlewareException, ServerException}
                SequenceMembershipRelation.scala  (1 usage found)
                    5 import org.sunbird.common.exception.ServerException
            src.main.scala.org.sunbird.graph.schema  (1 usage found)
                CategoryDefinitionValidator.scala  (1 usage found)
                    11 import org.sunbird.common.exception.{ResourceNotFoundException, ResponseCode, ServerException}
            src.main.scala.org.sunbird.graph.schema.validator  (1 usage found)
                FrameworkValidator.scala  (1 usage found)
                    10 import org.sunbird.common.exception.{ClientException, ResourceNotFoundException, ServerException}
        Maven: org.sunbird:platform-common:1.0-SNAPSHOT  (3 usages found)
            org.sunbird.common  (3 usages found)
                HttpUtil  (1 usage found)
                    11 import org.sunbird.common.exception.ServerException;
                HttpUtilTest  (1 usage found)
                    21 import org.sunbird.common.exception.ServerException;
                HttpUtilTests  (1 usage found)
                    5 import org.sunbird.common.exception.ServerException;
        Maven: org.sunbird:schema-validator:1.0-SNAPSHOT  (2 usages found)
            org.sunbird.schema  (2 usages found)
                SchemaValidatorFactory  (1 usage found)
                    5 import org.sunbird.common.exception.ServerException;
                TestSchemaValidatorFactory  (1 usage found)
                    7 import org.sunbird.common.exception.ServerException;
    Usage in instanceof  (1 usage found)
        Maven: org.sunbird:platform-common:1.0-SNAPSHOT  (1 usage found)
            org.sunbird.common.dto  (1 usage found)
                ResponseHandler  (1 usage found)
                    setResponseCode(Response, Throwable)  (1 usage found)
                        176 } else if (e instanceof ServerException) {

Expand
titleResourceNotFoundException
Code Block
Class
    ResourceNotFoundException
Usages in All Places  (34 usages found)
    Local variable declaration  (1 usage found)
        Maven: org.sunbird:platform-common:1.0-SNAPSHOT  (1 usage found)
            org.sunbird.common.exception  (1 usage found)
                ResourceNotFoundExceptionTest  (1 usage found)
                    testResourceNotFoundException_6()  (1 usage found)
                        37 ResourceNotFoundException exception =  new ResourceNotFoundException(ResponseCode.RESOURCE_NOT_FOUND.name(), "Node not found with identifier: ", "do_1234");
    New instance creation  (14 usages found)
        qs-hierarchy-manager  (2 usages found)
            org.sunbird.managers  (2 usages found)
                UpdateHierarchyManager.scala  (2 usages found)
                    267 throw new ResourceNotFoundException("ERR_UPDATE_QS_HIERARCHY", s"No node found with id: $nodeId")
                    288 } else throw new ResourceNotFoundException(HierarchyErrorCodes.ERR_CONTENT_NOT_FOUND, "Content not found with identifier: " + nodeId)
        Maven: org.sunbird:graph-engine_2.11:1.0-SNAPSHOT  (6 usages found)
            src.main.scala.org.sunbird.graph.schema  (2 usages found)
                CategoryDefinitionValidator.scala  (2 usages found)
                    56 throw new ResourceNotFoundException(resp.getParams.getErr, resp.getParams.getErrmsg + " " + resp.getResult)
                    62 throw new ResourceNotFoundException(channelCatResp.getParams.getErr, channelCatResp.getParams.getErrmsg + " " + channelCatResp.getResult)
            src.main.scala.org.sunbird.graph.schema.validator  (4 usages found)
                FrameworkValidator.scala  (3 usages found)
                    182 throw new ResourceNotFoundException("ERR_VALIDATING_CONTENT_FRAMEWORK", s"Nodes not found for Id's $ids ")
                    195 throw new ResourceNotFoundException("ERR_VALIDATING_CONTENT_FRAMEWORK", s"No nodes found for $termName with ids: ${node.getMetadata.get(termName)}")
                    197 throw new ResourceNotFoundException("ERR_VALIDATING_CONTENT_FRAMEWORK", s"No nodes found for $termName with ids: ${node.getMetadata.get(termName)}")
                VersioningNode.scala  (1 usage found)
                    44 throw new ResourceNotFoundException(GraphErrorCodes.ERR_INVALID_NODE.toString, "Node Not Found With Identifier : " + identifier)
        Maven: org.sunbird:platform-common:1.0-SNAPSHOT  (6 usages found)
            org.sunbird.common.exception  (6 usages found)
                ResourceNotFoundExceptionTest  (6 usages found)
                    testResourceNotFoundException_1()  (1 usage found)
                        11 throw new ResourceNotFoundException(ResponseCode.RESOURCE_NOT_FOUND.name(), "Node not found with identifier: ");
                    testResourceNotFoundException_2()  (1 usage found)
                        16 throw new ResourceNotFoundException(ResponseCode.RESOURCE_NOT_FOUND.name(), "Node not found with identifier: ", Arrays.asList("Message one ", "message 2"));
                    testResourceNotFoundException_3()  (1 usage found)
                        21 throw new ResourceNotFoundException(ResponseCode.RESOURCE_NOT_FOUND.name(), "Node not found with identifier: ", "message1", "message2");
                    testResourceNotFoundException_4()  (1 usage found)
                        26 throw new ResourceNotFoundException(ResponseCode.RESOURCE_NOT_FOUND.name(), "Node not found with identifier: ", new Throwable("message throwable"), "message1", "message2");
                    testResourceNotFoundException_5()  (1 usage found)
                        32 throw new ResourceNotFoundException(ResponseCode.RESOURCE_NOT_FOUND.name(), "Node not found with identifier: ", new Throwable("message throwable"));
                    testResourceNotFoundException_6()  (1 usage found)
                        37 ResourceNotFoundException exception =  new ResourceNotFoundException(ResponseCode.RESOURCE_NOT_FOUND.name(), "Node not found with identifier: ", "do_1234");
    Type parameter  (2 usages found)
        Maven: org.sunbird:graph-engine_2.11:1.0-SNAPSHOT  (2 usages found)
            src.test.scala.org.sunbird.graph.nodes  (2 usages found)
                TestDataNode.scala  (2 usages found)
                    150 recoverToSucceededIf[ResourceNotFoundException](DataNode.create(request))
                    274 recoverToSucceededIf[ResourceNotFoundException](DataNode.update(req))
    Usage in .class  (5 usages found)
        Maven: org.sunbird:platform-common:1.0-SNAPSHOT  (5 usages found)
            org.sunbird.common.exception  (5 usages found)
                ResourceNotFoundExceptionTest  (5 usages found)
                    testResourceNotFoundException_1()  (1 usage found)
                        9 @Test(expected = ResourceNotFoundException.class)
                    testResourceNotFoundException_2()  (1 usage found)
                        14 @Test(expected = ResourceNotFoundException.class)
                    testResourceNotFoundException_3()  (1 usage found)
                        19 @Test(expected = ResourceNotFoundException.class)
                    testResourceNotFoundException_4()  (1 usage found)
                        24 @Test(expected = ResourceNotFoundException.class)
                    testResourceNotFoundException_5()  (1 usage found)
                        30 @Test(expected = ResourceNotFoundException.class)
    Usage in import  (7 usages found)
        assessment-actors  (1 usage found)
            org.sunbird.managers  (1 usage found)
                AssessmentManager.scala  (1 usage found)
                    8 import org.sunbird.common.exception.{ClientException, ResourceNotFoundException, ServerException}
        qs-hierarchy-manager  (2 usages found)
            org.sunbird.managers  (2 usages found)
                HierarchyManager.scala  (1 usage found)
                    10 import org.sunbird.common.exception.{ClientException, ErrorCodes, ResourceNotFoundException, ResponseCode, ServerException}
                UpdateHierarchyManager.scala  (1 usage found)
                    9 import org.sunbird.common.exception.{ClientException, ErrorCodes, ResourceNotFoundException, ServerException}
        Maven: org.sunbird:graph-engine_2.11:1.0-SNAPSHOT  (4 usages found)
            src.main.scala.org.sunbird.graph.schema  (1 usage found)
                CategoryDefinitionValidator.scala  (1 usage found)
                    11 import org.sunbird.common.exception.{ResourceNotFoundException, ResponseCode, ServerException}
            src.main.scala.org.sunbird.graph.schema.validator  (2 usages found)
                FrameworkValidator.scala  (1 usage found)
                    10 import org.sunbird.common.exception.{ClientException, ResourceNotFoundException, ServerException}
                VersioningNode.scala  (1 usage found)
                    9 import org.sunbird.common.exception.ResourceNotFoundException
            src.test.scala.org.sunbird.graph.nodes  (1 usage found)
                TestDataNode.scala  (1 usage found)
                    9 import org.sunbird.common.exception.{ClientException, ResourceNotFoundException}
    Usage in instanceof  (3 usages found)
        Maven: org.sunbird:graph-engine_2.11:1.0-SNAPSHOT  (2 usages found)
            src.main.scala.org.sunbird.graph.schema.validator  (2 usages found)
                VersioningNode.scala  (2 usages found)
                    57 if (e.getCause.isInstanceOf[ResourceNotFoundException])
                    82 if (e.getCause.isInstanceOf[ResourceNotFoundException]) {
        Maven: org.sunbird:platform-common:1.0-SNAPSHOT  (1 usage found)
            org.sunbird.common.dto  (1 usage found)
                ResponseHandler  (1 usage found)
                    setResponseCode(Response, Throwable)  (1 usage found)
                        178 } else if (e instanceof ResourceNotFoundException) {
    Value read  (2 usages found)
        qs-hierarchy-manager  (2 usages found)
            org.sunbird.managers  (2 usages found)
                HierarchyManager.scala  (1 usage found)
                    197 }).flatMap(f => f) recoverWith { case e: ResourceNotFoundException => {
                UpdateHierarchyManager.scala  (1 usage found)
                    137 }) recover { case e: ResourceNotFoundException => TelemetryManager.log("No hierarchy is present in cassandra for identifier:" + rootNode.getIdentifier) }

Expand
titleServerException
Code Block
Class
    ServerException
Usages in All Places  (56 usages found)
    Local variable declaration  (1 usage found)
        Maven: org.sunbird:platform-common:1.0-SNAPSHOT  (1 usage found)
            org.sunbird.common.exception  (1 usage found)
                ServerExceptionTest  (1 usage found)s"Source With Identifiers ${sourceIds.diff(childrenIds).asJava} Not Found! Please Provide Valid Source Identifier.")
                    716 throw testServerException_6()  (1 usage found)
      new ClientException("ERR_BRANCHING_LOGIC", "An Object Can't Depend On More Than 1 Object")
                 37 ServerException exception =721 throw new ServerExceptionClientException(ErrorCodes."ERR_SYSTEM_EXCEPTION.name()BRANCHING_LOGIC", "Failed to create node object. Node from database is null.", new Throwable("message throwable"));
    New instance creation  (30 usages founds"${source.get(0)} Is Already Children Of ${pSource.get(0)}. So It Can't Be Parent For ${entry._1}")
        assessment-actors  (3 usages found)             org.sunbird.managersUpdateHierarchyManager.scala  (313 usages found)
                AssessmentManager.scala  (1 usage found)
     66 throw new ClientException(ErrorCodes.ERR_BAD_REQUEST.name(), "Hierarchy data is empty")
                  207 } else72 throw new ServerExceptionClientException("ERR_QUESTIONQS_SETUPDATE_HIERARCHY", "NoQuestion hierarchycannot ishave presentchildren in hierarchy")
 cassandra for identifier:" + rootNode.getIdentifier)               90 throw CopyManager.scala  (2 usages foundnew ClientException(HierarchyErrorCodes.ERR_INVALID_ROOT_ID, "Please Provide Valid Root Node Identifier")
                    107102 throw new ServerExceptionClientException("HierarchyErrorCodes.ERR_QUESTIONSET_COPY"INVALID_ROOT_ID, "Something Went Wrong, Please Try Again"Invalid MimeType for Root Node Identifier  : " + identifier)
                    116106 throw new ServerExceptionClientException("HierarchyErrorCodes.ERR_INVALID_QUESTIONSETROOT_COPY", "Something Went Wrong, Please Try Again")
        qs-hierarchy-manager  (4 usages found)ID, "Invalid Visibility found for Root Node Identifier  : " + identifier)
             org.sunbird.managers  (4 usages found)   195 throw new ClientException("ERR_UPDATE_QS_HIERARCHY", s"Object Type is mandatory for creation of node with id: HierarchyManager.scala  (3 usages found${nodeModified._1}")
                    488198 throw new ServerExceptionClientException("ERR_WHILEUPDATE_FETCHINGQS_HIERARCHY_FROM_CASSANDRA", "Error while fetching hierarchy from cassandras"Visibility can be only of type Parent for identifier: ${nodeModified._1}")
                    493200 throw new ServerExceptionClientException("ERR_WHILEUPDATE_FETCHINGQS_HIERARCHY_FROM_CASSANDRA", "Error while fetching hierarchy from cassandras"Visibility can be only of type ${HierarchyConstants.QUESTION_VISIBILITY.asJava} for identifier: ${nodeModified._1}")
                    575524 throw new ServerExceptionClientException("SERVERERR_BRANCHING_ERRORLOGIC", s"InvalidBranching responseIs fromNot search")Enabled For: ${node.getIdentifier}. Please Remove branchingLogic            UpdateHierarchyManager.scala  (1 usage foundfrom ${node.getIdentifier}")
                    128541 throw new ServerExceptionClientException(HierarchyErrorCodes."ERR_HIERARCHY_NOT_FOUNDBRANCHING_LOGIC", s"NoPlease hierarchyProvide is present in cassandraBranching Rules for identifier:" + rootNode.getIdentifier)
 ${branchingLogic.keySet.toList.diff(target).asJava}")
       Maven: org.sunbird:graph-engine_2.11:1.0-SNAPSHOT  (9 usages found)             src.main.scala.org.sunbird.graph.external.store  (5 usages found)
                ExternalStore.scala  (5 usages found544 throw new ClientException("ERR_BRANCHING_LOGIC", s"Please Provide Dependent Object Within Same Parent having identifier : ${node.getIdentifier}")
                    49547 throw new ServerExceptionClientException(ErrorCodes."ERR_SYSTEM_EXCEPTION.nameBRANCHING_LOGIC", "ExceptionAn OccurredObject WhileCan't SavingDepend TheOn Record.More ExceptionThan is1 : " + e.getMessageObject")
                    92550 throw new ServerExceptionClientException(ErrorCodes."ERR_SYSTEM_EXCEPTION.name, "Exception Occurred While Reading The Record. Exception is : " + e.getMessage)
        BRANCHING_LOGIC", "A Dependent Object Can't Have Further Dependent Object")
        Maven: org.sunbird:graph-engine_2.11:1.0-SNAPSHOT  (18 usages found)
            src.main.scala.org.sunbird.graph.nodes  (6 usages found)
           110 throw new ServerException(ErrorCodes.ERR_SYSTEM_EXCEPTION.name, "Exception Occurred While Reading The RecordDataNode.scala Exception is(6 : " + e.getMessageusages found)
                    15077 throw new ServerExceptionClientException(ErrorCodes.ERR_SYSTEMBAD_EXCEPTIONREQUEST.name(), "Exception Occurred While Reading The Record. Exception is : " + e.getMessage)identifiers is mandatory")
                    179 181else throw new ServerExceptionClientException(ErrorCodes."ERR_SYSTEM_EXCEPTION.nameINVALID_RELATION_OBJECT", "ExceptionInvalid OccurredRelation While Saving The Record. Exception is : " + e.getMessage)Object Found.")
                    src.main.scala.org.sunbird.graph.relations  (2 usages found)
                AbstractRelation.scala  (1 usage found216 if (metadata.isEmpty) throw new ClientException(ErrorCodes.ERR_BAD_REQUEST.name(), s"Invalid Request. Cannot update status of Image Node to $status.")
                    66261 throw new ServerExceptionClientException(GraphErrorCodesResponseCode.ERRRESOURCE_RELATIONNOT_VALIDATEFOUND.toStringname(), s"Error occurred while validating the relation", e)! Node(s) doesn't Exists with identifier : ${request.getContext.get("identifier")}.")
                    266 throw  SequenceMembershipRelation.scala  (1 usage foundnew ClientException(ErrorCodes.ERR_BAD_REQUEST.name(), s"Cannot update content with FAILED status for id : ${node.getIdentifier}.")
                    25304 throw new ServerExceptionClientException(GraphErrorCodesErrorCodes.ERR_RELATION_VALIDATE.toString, e.getMessage, eBAD_REQUEST.name(), s"Request contains invalid identifiers : ${missingIds.mkString("[", ", ", "]")}.")
            src.main.scala.org.sunbird.graph.schemarelations  (12 usageusages found)
                CategoryDefinitionValidatorRelationHandler.scala  (12 usageusages found)
                    65 } else18 throw new ServerExceptionClientException(resp.getParams.getErr, resp.getParams.getErrmsg +GraphErrorCodes.ERR_RELATION_CREATE.toString, "UnSupported Relation: " " + resp.getResultrelationType)
 
          src.main.scala.org.sunbird.graph.schema.validator  (1 usage found)                21 FrameworkValidator.scalathrow new (1 usage found)
  ClientException(GraphErrorCodes.ERR_RELATION_CREATE.toString, "UnSupported Relation: " + relationType)
                 152 throw new ServerException("ERR_GRAPH_PROCESSING_ERROR", "Unable To Fetch Nodes From Graph. Exception is: " + e.getMessage)src.main.scala.org.sunbird.graph.schema  (1 usage found)
               Maven: org.sunbird:platform-common:1.0-SNAPSHOTDefinitionDTO.scala  (131 usagesusage found)
                org.sunbird.common  (7 usages found)126 throw new ClientException(ResponseCode.CLIENT_ERROR.name, "Invalid request", java.util.Arrays.asList("Invalid Props are : " + invalidProps.asJavaCollection))
    HttpUtil  (7 usages found)    src.main.scala.org.sunbird.graph.schema.validator  (9 usages found)
            post(String, Map<String, Object>, Map<String, String>) FrameworkValidator.scala  (2 usages found)
                    52 case _ => 33 throw new ServerExceptionClientException("ERR_INVALID_REQUEST_BODYCLIENT_ERROR", "Validation Errors.", "Request Body is Missing!");
   util.Arrays.asList("Please provide correct value for [" + cat + "]"))
                    3864 throw new ServerExceptionClientException("ERRCLIENT_API_CALLERROR", "Something Went Wrong While Making API Call | Error is: " + e.getMessage());Validation Errors.", errors)
                PropAsEdgeValidator.scala  (4 usages found)
                    30 throw new get(String, String, Map<String, String>)  (1 usage found)
   ClientException("ERR_INVALID_EDGE_PROPERTY", key + " value should be one of " + list)
                    5834 throw new ServerExceptionClientException("ERR_INVALID_APIEDGE_CALLPROPERTY", "Somethingkey Went+ Wrong" Whilevalue Makingshould APIbe Callany |of Error is: " + e.getMessage()list);
                    getMetadata(String, Map<String, String>)  (1 usage found)
   36 throw new ClientException("ERR_INVALID_EDGE_PROPERTY", key + " given datatype is invalid.")
                    8439 throw new ServerExceptionClientException("ERR_EMPTY_EDGE_APIPROPERTY_CALLLIST", "SomethingThe Wentlist Wrongto While Making API Call | Errorvalidate input is: " + e.getMessage());empty.")
                 RelationValidator.scala   validateRequest(String,1 Map<String, String>)  (2 usages usage found)
                       45 90 throw new ServerException("ERR_INVALID_URL"ClientException(ResponseCode.CLIENT_ERROR.name, "UrlError Parameterwhile is Missing!");
   validating relations :: " + errList)
                VersionKeyValidator.scala  (2  92 throw new ServerException("ERR_INVALID_HEADER_PARAM", "Header Parameter is Missing!");usages found)
                    26 if(!isValid)throw new getResponse(HttpResponse<String>)  (1 usage foundClientException(ResponseCode.CLIENT_ERROR.name, "Invalid version Key")
                        10055 throw new ServerExceptionClientException("ERRBLANK_DATA_PARSERVERSION", "Unable to parse data!Error! Version Key cannot be Blank. | Error[Node isId: " + e.getMessage()); node.getIdentifier + "]")
        Maven: org.sunbird:platform-common:1.0-SNAPSHOT  (10 usages found)
            org.sunbird.common.exception  (62 usages found)
                ServerExceptionTestHttpUtil  (62 usages found)
                    testServerException_1(getMetadata(String, Map<String, String>)  (12 usageusages found)
                        1179 throw new ServerException(ResponseCode.SERVER_ERROR.name()ClientException("ERR_API_CALL", "FailedFetching toof createfile noderelated object.metadata NodeFailed fromwith database is null.");
                    testServerException_2()  (1 usage found)response code " + response.getStatus() + " and message: " + response.getStatusText());
                        1682 throw new ServerExceptionClientException(ErrorCodes."ERR_SYSTEM_EXCEPTION.name()API_CALL", "FailedSomething Went toWrong createWhile nodeMaking object.API NodeCall from| databaseError is: null.", + Arrayse.asList("Message one ", "message 2"getMessage());
                    testServerException_3()  (Maven: org.sunbird:schema-validator:1.0-SNAPSHOT  (1 usage found)
            org.sunbird.schema.dto  (1 usage found)
       21 throw new ServerException(ErrorCodes.ERR_SYSTEM_EXCEPTION.name(), "Failed to create node object. Node from databaseValidationResult is null.", "message1", "message2"); (1 usage found)
                    testServerException_4(ValidationResult(List<String>, Map<String, Object>, Map<String, Object>, Map<String, Object>)  (1 usage found)
                        2628 throw new ServerExceptionClientException(ErrorCodesResponseCode.ERRCLIENT_SYSTEM_EXCEPTIONERROR.name(), "Failed to create node object. Node from database is null.", new Throwable("message throwable"), "message1", "message2");
Validation Errors", messages);

Expand
titleResourceNotFoundException
Code Block
Class
    ResourceNotFoundException
    New instance creation  (14 usages found)
        testServerException_5()qs-hierarchy-manager  (12 usageusages found)
            org.sunbird.managers  (2 usages found)
       32 throw new ServerException(ErrorCodes.ERR_SYSTEM_EXCEPTION.name(), "Failed to create node object. Node from database is nullUpdateHierarchyManager.",scala new Throwable("message throwable"));2 usages found)
                    267 testServerException_6()throw new (1 usage found)
  ResourceNotFoundException("ERR_UPDATE_QS_HIERARCHY", s"No node found with id: $nodeId")
                    288 37} ServerExceptionelse exceptionthrow =  new ServerExceptionResourceNotFoundException(ErrorCodesHierarchyErrorCodes.ERR_SYSTEM_EXCEPTION.name()CONTENT_NOT_FOUND, "FailedContent tonot createfound node object. Node from database is null.", new Throwable("message throwable"));with identifier: " + nodeId)
        Maven: org.sunbird:schema-validatorgraph-engine_2.11:1.0-SNAPSHOT  (16 usageusages found)
            src.main.scala.org.sunbird.graph.schema  (1 usage found)
                SchemaValidatorFactory  (1 usage 2 usages found)
                    getExternalStoreName(String, String)  (1 usage found)CategoryDefinitionValidator.scala  (2 usages found)
                    3956 throw new ServerException("ERR_KEYSPACE_NOT_DEFINED", "Key space forResourceNotFoundException(resp.getParams.getErr, resp.getParams.getErrmsg + " " + nameresp.getResult)
+ " is not configured.");     Usage in .class  (10 usages found)      62 throw  Maven: org.sunbird:platform-common:1.0-SNAPSHOT  (9 usages foundnew ResourceNotFoundException(channelCatResp.getParams.getErr, channelCatResp.getParams.getErrmsg + " " + channelCatResp.getResult)
            src.main.scala.org.sunbird.commongraph.schema.validator  (4 usages found)
                HttpUtilTestFrameworkValidator.scala  (43 usages found)
                    182 testValidateRequestWithEmptyUrl()throw new (1 usage found)
                ResourceNotFoundException("ERR_VALIDATING_CONTENT_FRAMEWORK", s"Nodes not found for Id's $ids ")
       50 @Test(expected = ServerException.class)          195 throw new ResourceNotFoundException("ERR_VALIDATING_CONTENT_FRAMEWORK", s"No nodes found for $termName with  testValidateRequestWithEmptyHeader()  (1 usage found)ids: ${node.getMetadata.get(termName)}")
                    197 throw new ResourceNotFoundException("ERR_VALIDATING_CONTENT_FRAMEWORK", s"No nodes found for 60$termName @Test(expected = ServerException.classwith ids: ${node.getMetadata.get(termName)}")
                VersioningNode.scala  (1 usage testPostWithInvalidRequest(found)
 (1  usage found)                44 throw new ResourceNotFoundException(GraphErrorCodes.ERR_INVALID_NODE.toString, "Node Not Found With Identifier 93: @Test(expected" = ServerException.class)
+ identifier)
Expand
titleServerException
Code Block
Class
    ServerException
    New instance creation  (30 usages found)
        testGetResponseWithInvalidBody()assessment-actors  (13 usageusages found)
            org.sunbird.managers  (3 usages found)
       140 @Test(expected = ServerException.class)      AssessmentManager.scala  (1 usage found)
  org.sunbird.common.exception  (5 usages found)              207 } else ServerExceptionTestthrow new (5 usages found)
   ServerException("ERR_QUESTION_SET_HIERARCHY", "No hierarchy is present in cassandra for identifier:" + rootNode.getIdentifier)
                testServerException_1()CopyManager.scala  (12 usageusages found)
                    107 throw new ServerException("ERR_QUESTIONSET_COPY", "Something Went 9 @Test(expected = ServerException.classWrong, Please Try Again")
                    testServerException_2()  (1 usage found)
 116 throw new ServerException("ERR_QUESTIONSET_COPY", "Something Went Wrong, Please Try Again")
        qs-hierarchy-manager  (4 usages found)
         14 @Test(expected = ServerException.class)org.sunbird.managers  (4 usages found)
                testServerException_3()HierarchyManager.scala  (13 usageusages found)
                    488 throw new ServerException("ERR_WHILE_FETCHING_HIERARCHY_FROM_CASSANDRA", "Error while 19fetching @Test(expectedhierarchy = ServerException.classfrom cassandra")
                    testServerException_4()  (1 usage found)
   493 throw new ServerException("ERR_WHILE_FETCHING_HIERARCHY_FROM_CASSANDRA", "Error while fetching hierarchy from cassandra")
                    24575 @Test(expectedthrow =new ServerException.class)
   ("SERVER_ERROR", "Invalid response from search")
                testServerException_5()UpdateHierarchyManager.scala  (1 usage found)
                    128 throw new ServerException(HierarchyErrorCodes.ERR_HIERARCHY_NOT_FOUND, "No hierarchy is present in cassandra for identifier:"    30 @Test(expected = ServerException.class+ rootNode.getIdentifier)
        Maven: org.sunbird:schema-validatorgraph-engine_2.11:1.0-SNAPSHOT  (19 usageusages found)
            src.main.scala.org.sunbird.schemagraph.external.store  (15 usageusages found)
                TestSchemaValidatorFactoryExternalStore.scala  (15 usageusages found)
                    49 getExternalStoreNameInvalid()throw new (1 usage found)
                        44 @Test(expected = ServerException.classServerException(ErrorCodes.ERR_SYSTEM_EXCEPTION.name, "Exception Occurred While Saving The Record. Exception is : " + e.getMessage)
    Usage in import  (14 usages found)         assessment-actors 92 (2throw usages found)
            org.sunbird.managers  (2 usages found)new ServerException(ErrorCodes.ERR_SYSTEM_EXCEPTION.name, "Exception Occurred While Reading The Record. Exception is : " + e.getMessage)
                    110 AssessmentManager.scalathrow new (1 usage found)
         ServerException(ErrorCodes.ERR_SYSTEM_EXCEPTION.name, "Exception Occurred While Reading The Record. Exception is : " + e.getMessage)
          8 import org.sunbird.common.exception.{ClientException, ResourceNotFoundException, ServerException}      150 throw new ServerException(ErrorCodes.ERR_SYSTEM_EXCEPTION.name, "Exception Occurred While Reading The Record. Exception CopyManager.scalais : (1" usage+ founde.getMessage)
                    8181 throw importnew org.sunbird.common.exception.{ClientException, ServerException}
        qs-hierarchy-manager  (2 usages found)ServerException(ErrorCodes.ERR_SYSTEM_EXCEPTION.name, "Exception Occurred While Saving The Record. Exception is : " + e.getMessage)
               src.main.scala.org.sunbird.managersgraph.relations  (2 usages found)
                HierarchyManagerAbstractRelation.scala  (1 usage found)
                    1066 throw importnew org.sunbird.common.exception.{ClientException, ErrorCodes, ResourceNotFoundException, ResponseCode, ServerException}ServerException(GraphErrorCodes.ERR_RELATION_VALIDATE.toString, "Error occurred while validating the relation", e)
                UpdateHierarchyManagerSequenceMembershipRelation.scala  (1 usage found)
                    925 import org.sunbird.common.exception.{ClientException, ErrorCodes, ResourceNotFoundException, ServerException}
        Maven: org.sunbird:graph-engine_2.11:1.0-SNAPSHOT  (5 usages foundthrow new ServerException(GraphErrorCodes.ERR_RELATION_VALIDATE.toString, e.getMessage, e)
            src.main.scala.org.sunbird.graph.external.storeschema  (1 usage found)
                ExternalStoreCategoryDefinitionValidator.scala  (1 usage found)
                    14 import org.sunbird.common.exception.{ErrorCodes, ResponseCode, ServerException}65 } else throw new ServerException(resp.getParams.getErr, resp.getParams.getErrmsg + " " + resp.getResult)
            src.main.scala.org.sunbird.graph.relationsschema.validator  (21 usagesusage found)
                AbstractRelationFrameworkValidator.scala  (1 usage found)
                    5152 import org.sunbird.common.exception.{MiddlewareException, ServerException}
                SequenceMembershipRelation.scala  (1 usage found)throw new ServerException("ERR_GRAPH_PROCESSING_ERROR", "Unable To Fetch Nodes From Graph. Exception is: " + e.getMessage)
        Maven: org.sunbird:platform-common:1.0-SNAPSHOT  (13 usages found)
          5 import org.sunbird.common.exception.ServerException  (7 usages found)
        src.main.scala.org.sunbird.graph.schema  (1 usage found)    HttpUtil  (7 usages found)
        CategoryDefinitionValidator.scala  (1 usage found)        post(String, Map<String, Object>, Map<String, String>)  (2 usages found)
    11 import org.sunbird.common.exception.{ResourceNotFoundException, ResponseCode, ServerException}             src.main.scala.org.sunbird.graph.schema.validator  (1 usage found) 33 throw new ServerException("ERR_INVALID_REQUEST_BODY", "Request Body is Missing!");
        FrameworkValidator.scala  (1 usage found)            38 throw new ServerException("ERR_API_CALL", "Something Went Wrong While Making 10API import org.sunbird.common.exception.{ClientException, ResourceNotFoundException, ServerException}
  Call | Error is: " + e.getMessage());
     Maven: org.sunbird:platform-common:1.0-SNAPSHOT  (3 usages found)          get(String, String,  org.sunbird.commonMap<String, String>)  (31 usagesusage found)
                   HttpUtil  (1 usage found) 58 throw new ServerException("ERR_API_CALL", "Something Went Wrong While Making API Call | Error is: " + e.getMessage());
   11 import org.sunbird.common.exception.ServerException;               getMetadata(String, Map<String, HttpUtilTestString>)  (1 usage found)
                    21 import org.sunbird.common.exception.ServerException;   84 throw new ServerException("ERR_API_CALL", "Something Went Wrong While Making API Call | Error is: HttpUtilTests" + (1 usage found)e.getMessage());
                    5 import org.sunbird.common.exception.ServerException;
   validateRequest(String, Map<String, String>)  (2 usages found)
    Maven: org.sunbird:schema-validator:1.0-SNAPSHOT  (2 usages found)             org.sunbird.schema  (2 usages90 found)throw new ServerException("ERR_INVALID_URL", "Url Parameter is Missing!");
          SchemaValidatorFactory  (1 usage found)          92 throw new ServerException("ERR_INVALID_HEADER_PARAM", "Header Parameter is Missing!");
   5 import org.sunbird.common.exception.ServerException;                 TestSchemaValidatorFactorygetResponse(HttpResponse<String>)  (1 usage found)
                    7 import org.sunbird.common.exception.ServerException;
    Usage in instanceof  (1 usage found)    100 throw new ServerException("ERR_DATA_PARSER", "Unable to parse data! | Error is: " + e.getMessage());
        Maven: org.sunbird:platformschema-commonvalidator:1.0-SNAPSHOT  (1 usage found)
            org.sunbird.common.dtoschema  (1 usage found)
                ResponseHandlerSchemaValidatorFactory  (1 usage found)
                    setResponseCodegetExternalStoreName(ResponseString, ThrowableString)  (1 usage found)
                        39 throw new ServerException("ERR_KEYSPACE_NOT_DEFINED", "Key space for " 176+ }name else+ if" (eis instanceofnot ServerException) {configured.");

API Error Responses from inQuiry microservice

Expand
title400 Bad Request

API Functionality

HTTP Error Code

Existing Error Response

Proposed Error Response

Question Create

400 Bad Request

Code Block
{
    "id": "api.question.create",
    "ver": "3.0",
    "ts": "2023-05-14T14:27:33ZZ",
    "params": {
        "resmsgid": "c34e2d4f-779b-49fc-9d6a-db4466c8de3a",
        "msgid": null,
        "err": "CLIENT_ERROR",
        "status": "failed",
        "errmsg": "Validation Errors"
    },
    "responseCode": "CLIENT_ERROR",
    "result": {
        "messages": [
            "Required Metadata name not set"
        ]
    }
}
Code Block
{
    "id": "api.question.create",
    "ver": "3.0",
    "ts": "2023-05-14T14:27:33ZZ",
    "params": {
        "resmsgid": "c34e2d4f-779b-49fc-9d6a-db4466c8de3a",
        "msgid": null,
        "err": "CLIENT_ERROR",
        "status": "failed",
        "errmsg": "Validation Errors"
    },
    "responseCode": "CLIENT_ERROR",
    "result": {
        "errors": [
          {
            "identifier": "name",
            "message": "Required Metadata name not set"
          }
        ]
    }
}

Question Create

400 Bad Request

Code Block
{
    "id": "api.question.create",
    "ver": "3.0",
    "ts": "2023-05-14T14:26:17ZZ",
    "params": {
        "resmsgid": "e45e51ca-8c4e-4585-ab03-75ab8b131bb5",
        "msgid": null,
        "err": "CLIENT_ERROR",
        "status": "failed",
        "errmsg": "Validation Errors"
    },
    "responseCode": "CLIENT_ERROR",
    "result": {
        "messages": [
            "Required Metadata code not set"
        ]
    }
}

Question Create

400 Bad Request

Code Block
{
    "id": "api.question.create",
    "ver": "3.0",
    "ts": "2023-05-14T14:26:27ZZ",
    "params": {
        "resmsgid": "0020dd04-65ad-4e8a-9194-bb927025d3e0",
        "msgid": null,
        "err": "CLIENT_ERROR",
        "status": "failed",
        "errmsg": "Validation Errors"
    },
    "responseCode": "CLIENT_ERROR",
    "result": {
        "messages": [
            "Required Metadata mimeType not set"
        ]
    }
}

Question Create

400 Bad Request

Code Block
{
    "id": "api.question.create",
    "ver": "3.0",
    "ts": "2023-05-14T14:51:49ZZ",
    "params": {
        "resmsgid": "3814749d-47a0-4e38-a040-6d32e8e4cbcf",
        "msgid": null,
        "err": "CLIENT_ERROR",
        "status": "failed",
        "errmsg": "Validation Errors"
    },
    "responseCode": "CLIENT_ERROR",
    "result": {
        "messages": [
            "Required Metadata primaryCategory not set"
        ]
    }
}

Question Create

400 Bad Request

Code Block
{
    "id": "api.question.create",
    "ver": "3.0",
    "ts": "2023-05-14T14:26:35ZZ",
    "params": {
        "resmsgid": "4ab85c6e-3ee4-4dc3-bcbf-0292b734dfdc",
        "msgid": null,
        "err": "CLIENT_ERROR",
        "status": "failed",
        "errmsg": "Validation Errors"
    },
    "responseCode": "CLIENT_ERROR",
    "result": {
        "messages": [
            "Metadata mimeType should be one of: [application/vnd.sunbird.question]"
        ]
    }
}
Code Block
{
    "id": "api.question.create",
    "ver": "3.0",
    "ts": "2023-05-14T14:26:35ZZ",
    "params": {
        "resmsgid": "4ab85c6e-3ee4-4dc3-bcbf-0292b734dfdc",
        "msgid": null,
        "err": "CLIENT_ERROR",
        "status": "failed",
        "errmsg": "Validation Errors"
    },
    "responseCode": "CLIENT_ERROR",
    "result": {
        "errors": [
          {
            "identifier": "mimeType",
            "message": "Metadata mimeType should be one of: [application/vnd.sunbird.question]"
          }
        ]
    }
}

Question Update

400 Bad Request

Code Block
{
    "id": "api.question.update",
    "ver": "3.0",
    "ts": "2023-05-14T14:29:03ZZ",
    "params": {
        "resmsgid": "d43a4913-d662-4a8a-8859-9add9a04da52",
        "msgid": null,
        "err": "CLIENT_ERROR",
        "status": "failed",
        "errmsg": "Invalid version Key"
    },
    "responseCode": "CLIENT_ERROR",
    "result": {
        "messages": null
    }
}
Code Block
{
    "id": "api.question.update",
    "ver": "3.0",
    "ts": "2023-05-14T14:29:03ZZ",
    "params": {
        "resmsgid": "d43a4913-d662-4a8a-8859-9add9a04da52",
        "msgid": null,
        "err": "CLIENT_ERROR",
        "status": "failed",
        "errmsg": "Invalid version Key"
    },
    "responseCode": "CLIENT_ERROR",
    "result": {
        "errors": [
          {
            "identifier": "version key",
            "message": "Invalid version Key"
          }
        ]
    }
}

Question Review

400 Bad Request

Code Block
{
    "id": "api.question.review",
    "ver": "3.0",
    "ts": "2023-05-14T14:30:20ZZ",
    "params": {
        "resmsgid": "fd89269b-36f9-4673-8af4-db41b5f60716",
        "msgid": null,
        "err": "ERR_MANDATORY_FIELD_VALIDATION",
        "status": "failed",
        "errmsg": "Mandatory Fields [body] Missing for do_21379593928588492814142"
    },
    "responseCode": "CLIENT_ERROR",
    "result": {
        "messages": null
    }
}
Code Block
{
    "id": "api.question.review",
    "ver": "3.0",
    "ts": "2023-05-14T14:30:20ZZ",
    "params": {
        "resmsgid": "fd89269b-36f9-4673-8af4-db41b5f60716",
        "msgid": null,
        "err": "ERR_MANDATORY_FIELD_VALIDATION",
        "status": "failed",
        "errmsg": "Mandatory Fields [body] Missing for do_21379593928588492814142"
    },
    "responseCode": "CLIENT_ERROR",
    "result": {
        "errors": [
          {
            "identifier": "body",
            "message": "Mandatory Fields [body] Missing for do_21379593928588492814142"
          }
        ]
    }
}

Question Review

400 Bad Request

Code Block
{
    "id": "api.question.review",
    "ver": "3.0",
    "ts": "2023-05-14T14:30:24ZZ",
    "params": {
        "resmsgid": "851c2874-e6fe-42b0-8c4f-67c234154bc8",
        "msgid": null,
        "err": "ERR_MANDATORY_FIELD_VALIDATION",
        "status": "failed",
        "errmsg": "Mandatory Fields [responseDeclaration] Missing for do_21379593932446105614143"
    },
    "responseCode": "CLIENT_ERROR",
    "result": {
        "messages": null
    }
}

Question Review

400 Bad Request

Code Block
{
    "id": "api.question.review",
    "ver": "3.0",
    "ts": "2023-05-14T14:30:29ZZ",
    "params": {
        "resmsgid": "23ee2a5c-6ad7-4bae-80c2-94d42f82546d",
        "msgid": null,
        "err": "ERR_MANDATORY_FIELD_VALIDATION",
        "status": "failed",
        "errmsg": "Mandatory Fields [interactions] Missing for do_21379593936168550414144"
    },
    "responseCode": "CLIENT_ERROR",
    "result": {
        "messages": null
    }
}

Question Review

400 Bad Request

Code Block
{
    "id": "api.question.review",
    "ver": "3.0",
    "ts": "2023-05-14T14:30:34ZZ",
    "params": {
        "resmsgid": "3de1955f-c480-4903-ba17-05e59cf2dc43",
        "msgid": null,
        "err": "ERR_MANDATORY_FIELD_VALIDATION",
        "status": "failed",
        "errmsg": "Mandatory Fields [answer] Missing for do_21379593940282572814145"
    },
    "responseCode": "CLIENT_ERROR",
    "result": {
        "messages": null
    }
}

Question Publish

400 Bad Request

Code Block
{
    "id": "api.question.publish",
    "ver": "3.0",
    "ts": "2023-05-14T14:30:56ZZ",
    "params": {
        "resmsgid": "3c82e765-b5e0-4fec-8e5e-87d66f60b323",
        "msgid": null,
        "err": "ERR_MANDATORY_FIELD_VALIDATION",
        "status": "failed",
        "errmsg": "Mandatory Fields [body] Missing for do_21379593958717030414146"
    },
    "responseCode": "CLIENT_ERROR",
    "result": {
        "messages": null
    }
}

Question Publish

400 Bad Request

Code Block
{
    "id": "api.question.publish",
    "ver": "3.0",
    "ts": "2023-05-14T14:31:00ZZ",
    "params": {
        "resmsgid": "e54e1b92-98a8-46bb-a27c-f9790dffd713",
        "msgid": null,
        "err": "ERR_MANDATORY_FIELD_VALIDATION",
        "status": "failed",
        "errmsg": "Mandatory Fields [responseDeclaration] Missing for do_21379593961955328014147"
    },
    "responseCode": "CLIENT_ERROR",
    "result": {
        "messages": null
    }
}

Question Publish

400 Bad Request

Code Block
{
    "id": "api.question.publish",
    "ver": "3.0",
    "ts": "2023-05-14T14:31:04ZZ",
    "params": {
        "resmsgid": "80ab8746-8455-4d62-9bf9-886bd38851d8",
        "msgid": null,
        "err": "ERR_MANDATORY_FIELD_VALIDATION",
        "status": "failed",
        "errmsg": "Mandatory Fields [interactions] Missing for do_21379593964663603214148"
    },
    "responseCode": "CLIENT_ERROR",
    "result": {
        "messages": null
    }
}

Question Publish

400 Bad Request

Code Block
{
    "id": "api.question.publish",
    "ver": "3.0",
    "ts": "2023-05-14T14:31:07ZZ",
    "params": {
        "resmsgid": "7ec01a2a-3e35-46d7-8385-0dcc81780708",
        "msgid": null,
        "err": "ERR_MANDATORY_FIELD_VALIDATION",
        "status": "failed",
        "errmsg": "Mandatory Fields [answer] Missing for do_21379593967552921614149"
    },
    "responseCode": "CLIENT_ERROR",
    "result": {
        "messages": null
    }
}

Question List

400 Bad Request

Code Block
{
    "id": "api.questions.list",
    "ver": "3.0",
    "ts": "2023-05-14T14:31:29ZZ",
    "params": {
        "resmsgid": "f76b3bb2-05f0-428a-b0ee-113609f12b6f",
        "msgid": null,
        "err": "ERR_BAD_REQUEST",
        "status": "failed",
        "errmsg": "Request contains invalid identifiers : [do_list_abc_123]."
    },
    "responseCode": "CLIENT_ERROR",
    "result": {
        "messages": null
    }
}

Question List

400 Bad Request

Code Block
{
    "id": "api.questions.list",
    "ver": "3.0",
    "ts": "2023-05-14T14:31:34ZZ",
    "params": {
        "resmsgid": "9edb0e68-8a15-4219-a92a-902efcc786ee",
        "msgid": null,
        "err": "ERR_BAD_REQUEST",
        "status": "failed",
        "errmsg": "Request contains invalid identifiers : [do_list_abc_234, do_list_abc_123]."
    },
    "responseCode": "CLIENT_ERROR",
    "result": {
        "messages": null
    }
}

Question Import

400 Bad Request

Code Block
{
    "id": "api.question.import",
    "ver": "3.0",
    "ts": "2023-05-14T14:32:00ZZ",
    "params": {
        "resmsgid": "b71e805f-5341-4e56-93ed-9f57fd293864",
        "msgid": null,
        "err": "ERR_REQUIRED_PROPS_VALIDATION",
        "status": "failed",
        "errmsg": "Validation Failed! Mandatory Properties Are [\"name\",\"code\",\"mimeType\",\"framework\",\"channel\"] | Required Property's Missing For [fb1aef22-88e4-4f91-8055-6086bf338bf1]"
    },
    "responseCode": "CLIENT_ERROR",
    "result": {
        "messages": null
    }
}

Question Import

400 Bad Request

Code Block
{
    "id": "api.question.import",
    "ver": "3.0",
    "ts": "2023-05-14T14:32:09ZZ",
    "params": {
        "resmsgid": "6a19eeec-b742-4057-a782-c5c1a6a73695",
        "msgid": null,
        "err": "ERR_READ_SOURCE",
        "status": "failed",
        "errmsg": "Received Invalid Response While Reading Data From Source. Response Code is : RESOURCE_NOT_FOUND"
    },
    "responseCode": "CLIENT_ERROR",
    "result": {
        "messages": null
    }
}

Question Reject

400 Bad Request

Code Block
{
    "id": "api.question.reject",
    "ver": "3.0",
    "ts": "2023-05-14T14:32:19ZZ",
    "params": {
        "resmsgid": "1acd73e6-d400-492e-abf5-5654c3425934",
        "msgid": null,
        "err": "ERR_QUESTION_REJECT",
        "status": "failed",
        "errmsg": "Question is not in 'Review' state for identifier: do_21379594026542694414151"
    },
    "responseCode": "CLIENT_ERROR",
    "result": {
        "messages": null
    }
}

QuestionSet Create

400 Bad Request

Code Block
{
    "id": "api.questionset.create",
    "ver": "3.0",
    "ts": "2023-05-14T14:32:44ZZ",
    "params": {
        "resmsgid": "9ce43dcc-49c6-4b19-9285-1e4019bfbf30",
        "msgid": null,
        "err": "CLIENT_ERROR",
        "status": "failed",
        "errmsg": "Validation Errors"
    },
    "responseCode": "CLIENT_ERROR",
    "result": {
        "messages": [
            "Required Metadata name not set"
        ]
    }
}

QuestionSet Create

400 Bad Request

Code Block
{
    "id": "api.questionset.create",
    "ver": "3.0",
    "ts": "2023-05-14T14:32:53ZZ",
    "params": {
        "resmsgid": "6ac7f1cc-a41a-4bf4-a5f7-49f16beece82",
        "msgid": null,
        "err": "CLIENT_ERROR",
        "status": "failed",
        "errmsg": "Validation Errors"
    },
    "responseCode": "CLIENT_ERROR",
    "result": {
        "messages": [
            "Required Metadata code not set"
        ]
    }
}

QuestionSet Create

400 Bad Request

Code Block
{
    "id": "api.questionset.create",
    "ver": "3.0",
    "ts": "2023-05-14T14:32:56ZZ",
    "params": {
        "resmsgid": "6a4dc627-3593-49d5-adcf-d0c0a077cff6",
        "msgid": null,
        "err": "CLIENT_ERROR",
        "status": "failed",
        "errmsg": "Validation Errors"
    },
    "responseCode": "CLIENT_ERROR",
    "result": {
        "messages": [
            "Required Metadata mimeType not set"
        ]
    }
}

QuestionSet Update

200 OK

??

QuestionSet Update Hierarchy

400 Bad Request

Code Block
{
    "id": "api.questionset.hierarchy.update",
    "ver": "3.0",
    "ts": "2023-05-14T14:33:44ZZ",
    "params": {
        "resmsgid": "948bf8e0-c33c-40ed-8e69-fdecace00b7d",
        "msgid": null,
        "err": "ERR_INVALID_ROOT_ID",
        "status": "failed",
        "errmsg": "Please Provide Valid Root Node Identifier"
    },
    "responseCode": "CLIENT_ERROR",
    "result": {
        "messages": null
    }
}

QuestionSet Review

400 Bad Request

Code Block
{
    "id": "api.questionset.review",
    "ver": "3.0",
    "ts": "2023-05-14T14:34:05ZZ",
    "params": {
        "resmsgid": "f90d747b-be39-4fad-992c-c5e2c8575806",
        "msgid": null,
        "err": "ERR_MANDATORY_FIELD_VALIDATION",
        "status": "failed",
        "errmsg": "Mandatory Fields [responseDeclaration] Missing for do_21379594112953548814163"
    },
    "responseCode": "CLIENT_ERROR",
    "result": {
        "messages": null
    }
}

QuestionSet Publish

400 Bad Request

Code Block
{
    "id": "api.questionset.publish",
    "ver": "3.0",
    "ts": "2023-05-14T14:34:33ZZ",
    "params": {
        "resmsgid": "25552ef2-1af5-4bbb-80cb-d68b8f229b1f",
        "msgid": null,
        "err": "ERR_MANDATORY_FIELD_VALIDATION",
        "status": "failed",
        "errmsg": "Mandatory Fields [responseDeclaration] Missing for do_21379594136426086414168"
    },
    "responseCode": "CLIENT_ERROR",
    "result": {
        "messages": null
    }
}

QuestionSet Retire

400 Bad Request

Code Block
{
    "id": "api.questionset.retire",
    "ver": "3.0",
    "ts": "2023-05-14T14:35:05ZZ",
    "params": {
        "resmsgid": "b2e2a370-dee4-47cb-8fe6-a250cdc70f7c",
        "msgid": null,
        "err": "ERR_QUESTION_SET_RETIRE",
        "status": "failed",
        "errmsg": "QuestionSet with identifier : do_21379594162091622414177 is already Retired."
    },
    "responseCode": "CLIENT_ERROR",
    "result": {
        "messages": null
    }
}

QuestionSet Reject

400 Bad Request

Code Block
{
    "id": "api.questionset.reject",
    "ver": "3.0",
    "ts": "2023-05-14T14:38:57ZZ",
    "params": {
        "resmsgid": "ff2aac33-c257-487a-85a8-b44a013e2f71",
        "msgid": null,
        "err": "ERR_QUESTION_SET_REJECT",
        "status": "failed",
        "errmsg": "QuestionSet is not in 'Review' state for identifier: do_21379594343893401614182"
    },
    "responseCode": "CLIENT_ERROR",
    "result": {
        "messages": null
    }
}

QuestionSet Import

400 Bad Request

Code Block
{
    "id": "api.questionset.import",
    "ver": "3.0",
    "ts": "2023-05-14T14:39:31ZZ",
    "params": {
        "resmsgid": "b8a1999b-5893-4ef5-801d-b7c73813119f",
        "msgid": null,
        "err": "ERR_REQUIRED_PROPS_VALIDATION",
        "status": "failed",
        "errmsg": "Validation Failed! Mandatory Properties Are [\"name\",\"code\",\"mimeType\",\"framework\",\"channel\"] | Required Property's Missing For [4f85db76-f8c4-41d0-b45c-a8cadba2f618]"
    },
    "responseCode": "CLIENT_ERROR",
    "result": {
        "messages": null
    }
}

QuestionSet Import

400 Bad Request

Code Block
{
    "id": "api.questionset.import",
    "ver": "3.0",
    "ts": "2023-05-14T14:39:36ZZ",
    "params": {
        "resmsgid": "45cd3ffc-205e-44cd-8017-40804711aa2a",
        "msgid": null,
        "err": "ERR_READ_SOURCE",
        "status": "failed",
        "errmsg": "Received Invalid Response While Reading Data From Source. Response Code is : RESOURCE_NOT_FOUND"
    },
    "responseCode": "CLIENT_ERROR",
    "result": {
        "messages": null
    }
}

QuestionSet Add Children

400 Bad Request

Code Block
{
    "id": "api.questionset.add",
    "ver": "3.0",
    "ts": "2023-05-14T14:39:44ZZ",
    "params": {
        "resmsgid": "6f0aa0d2-6d4a-4788-8a22-0c68d8bb841a",
        "msgid": null,
        "err": "ERR_BAD_REQUEST",
        "status": "failed",
        "errmsg": "children are mandatory"
    },
    "responseCode": "CLIENT_ERROR",
    "result": {
        "messages": null
    }
}

QuestionSet Remove Children

400 Bad Request

Code Block
{
    "id": "api.questionset.remove",
    "ver": "3.0",
    "ts": "2023-05-14T14:40:01ZZ",
    "params": {
        "resmsgid": "242d2006-4e0e-49d8-8edd-725e68fd6a16",
        "msgid": null,
        "err": "ERR_BAD_REQUEST",
        "status": "failed",
        "errmsg": "children are mandatory"
    },
    "responseCode": "CLIENT_ERROR",
    "result": {
        "messages": null
    }
}

...