Content Management and Capture

Content Management and Capture

Come for answers. Stay for best practices. All we’re missing is you.

 View Only
  • 1.  Error response from Filenet graphql api 5.5.12-17

    Posted 01/28/26 12:10 PM

    So, I understand the error structure of filenet graphql api looks like below.

    But is there a way to get all the possible values of extension.errorCode for my org specific filenet api? I do not have access to filenet api code, but I can query/uploa file and also has access to graphiql. Is there a way to know this?

    {
        "errors": [
            {
                "message": "Exception while fetching data (/folder) : Unexpected exception on repository:OSFNDEP1",
                "locations": [
                    {/
                        "line": 2,
                        "column": 11
                    }
                ],
                "path": [
                    "folder"
                ],
                "extensions": {
                    "errorCode": "FNRJG1014",
                    "message": "Unexpected exception on repository:OSFNDEP1",
                    "explanation": "An unexpected exception occurred on repository:OSFNDEP1.",
                    "userResponse": "Contact your system administrator for assistance.",
                    "statusCode": "500",
                    "serverErrorMessage": "The URI for server communication cannot be determined from the connection object https://xyz.ct.gov/wsi/FNxxxMTOM/. Duration 13 milliseconds.",
                    "classification": "DataFetchingException"
                }
            }
        ],
        "data": {
            "folder": null
        }
    }



    ------------------------------
    Vamshi Shetty
    ------------------------------


  • 2.  RE: Error response from Filenet graphql api 5.5.12-17

    Posted 01/29/26 01:45 PM

    We don't currently publish the graphql api error codes anywhere but we should. 

    For now, do you have access to the server environment that has the war file? If this is a container environment the deployed war file would be inside the container. If on tWAS it would be the deployed war file. Inside the war file (which can be opened as a zip file) there is a jar file content-graphql-api.jar located at WEB-INF/lib/content-graphql-api.jar. Then you have to look inside that jar file for a properties file com/ibm/ecm/content/nls/Exceptions.properties. This has all of the exception codes in it, minus the FNRGJ prefix which is prepended at runtime.

    For now that's the best solution I can recommend for getting the full list of error codes.

    Thanks,

    David Hanson



    ------------------------------
    DAVID Hanson
    ------------------------------



  • 3.  RE: Error response from Filenet graphql api 5.5.12-17

    Posted 02/02/26 08:32 AM

    Hey DAVID Hanson

    Thanks for the response.
    No, I don't have access to the server WAR/JAR files. I'm only a consumer of the FileNet GraphiQL API.

    Also, I can't find any published documentation that lists these error codes or defines the error response structure. Could you share a link to the page where the GraphQL error/exception schema is documented (including extensions fields)?

    For example, in some error responses the extensions.userResponse field is missing so I'm trying to understand when that field is expected to be present and what the guaranteed fields are.
    And sometimes I do not see the extension object as well. Is there a proper document which explains these gaps?



    ------------------------------
    Vamshi Shetty
    ------------------------------



  • 4.  RE: Error response from Filenet graphql api 5.5.12-17

    Posted 02/02/26 07:17 PM

    There is no documentation with the error codes defined. That is new documentation we will need to make available somewhere.

    I copied the file I mentioned -- Exceptions.properties -- to this location in box. It should be accessible to anyone with the link. https://ibm.box.com/s/8aiukfdwq9f53mxuccri8j6j87rfrfn2

    The structure of an error returned by GraphQL is defined by the GraphQL specification. The "extensions" field is for a provider, such as our API, to add additional data to the error. The "errorCode", "message", "explanation", "userResponse" and "statusCode" fields are as defined in that properties file, with the FNRJC prefix added to the "errorCode". I think "classification" is always "DataFetchingException" if the error comes from our API code.

    If there is not a "userResponse" or not an "extensions" at all, it could be that that particular error does not have a "userResponse" or it does not originate from one of our errors. If there is no "errorCode" with a FNRJC prefix the error originates from some core GraphQL server toolkit code and not our API code. There would normally be something wrong with the graphql request itself in that case.



    ------------------------------
    DAVID Hanson
    ------------------------------