Skip to content

Mashup API error response data is missing #541

@hdoedens

Description

@hdoedens

Describe the bug
When a call to PCore.getMashupApi().createCase() fails, there are no error details available in the catch property. The response data is missing.

To Reproduce
Steps to reproduce the behavior:

  1. Create a case type with a Validation in the requirements section of the first stage, failing the validation with an error like 'creation failed'.
  2. Open a browser and navigate to the portal with developer network tools open.
  3. From a constellation portal, execute the following code
PCore.getMashupApi().createCase(option.pyClassName, contextName, {
  pageName: 'pyEmbedAssignment',
  startingFields: startingFields as object,
}).catch(response => {
  console.log({response})
});
  1. Check the network response -> HTTP 422 with the error message 'creation failed'
  2. Check the console log -> response: undefined

Expected behavior
I would expect to have the error response available in the catch block for further processing.

Desktop (please complete the following information):

  • OS: MacOS Sonoma
  • Browser: all browsers (I used Chrome)

Additional context
The HTTP error is written to the redux store, but there seems no API call to retrieve it using the Constellation SDK.

{
  data: {
    app: {
      context_data: {
        isLoading: false,
        caseInfo: {
          content: {
            summary_of_messages__: {
              propertyMessages__: {}
            }
          }
        },
        summary_of_messages__: {
          pageMessages__: [
            {
              type: 'error',
              message: 'creation failed'
            }
          ]
        }
      }
      .
      .
      .

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions