-
Notifications
You must be signed in to change notification settings - Fork 37
Open
Description
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:
- Create a case type with a Validation in the requirements section of the first stage, failing the validation with an error like 'creation failed'.
- Open a browser and navigate to the portal with developer network tools open.
- 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})
});
- Check the network response -> HTTP 422 with the error message 'creation failed'
- 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
Labels
No labels