Display correct structure upload status based uniquely on NSI HTTP return code (e.g. "200", "201", ...") and always display full status message
Scenario 1:
When artefact update in DLM was successful (HTTP status 200), NSI WS returns (success) status information in SDMX response tag "ErrorMessage" (because SDMX message doesn't have yet another status tag). The DLM currently shows the red error information in this case:
But a green success message text should be shown instead, because the HTTP return code (success) prevails the suggested (but not meant) meaning of the "ErrorMessage" tag. The details of the DLM status message should show the full content of the response body's SDMX "ErrorMessage" tag ("Updated : Codelist OECD.CFE:CL_TOURISM_MEASURE (v1.0).").
Thus instead of red
SIS-CC-reset space: Error(s) in structure upload
unknown status: 200
it should display in green
Successful structure upload into space SIS-CC-reset:
Updated : Codelist OECD.CFE:CL_TOURISM_MEASURE (v1.0).
Scenario 2:
When artefact creation in DLM was successful (HTTP status 201), NSI WS returns (creation success) status information in SDMX response tag "ErrorMessage" (because SDMX message doesn't have yet another status tag). The DLM currently shows the green status information:
A clearer DLM success message text should be shown instead, and its details should show the full content of the response body's SDMX "ErrorMessage" tag ("Created : Codelist OECD:CL_JENS (v1.0). Success: Codelist OECD:CL_JENS (v1.0) was inserted.").
Thus instead of
staging:SIS-CC-reset space: acknowledge success
it should display
Successful structure upload into space staging:SIS-CC-reset:
Created : Codelist OECD:CL_JENS (v1.0). Success: Codelist OECD:CL_JENS (v1.0) was inserted.
Scenario 3:
When artefact creation in DLM was unsuccessful (e.g. HTTP status 403), the DLM currently shows the status information in this way:
For consistency with the 2 above scenarios the DLM error message text should be reworded.
Thus instead of
staging:SIS-CC-reset space: Error(s) in structure upload
Not Updated : Codelist OECD:CL_JENS (v1.0). Reason : no differences were found
it should display
Error(s) in structure upload into space staging:SIS-CC-reset:
Not Updated : Codelist OECD:CL_JENS (v1.0). Reason : no differences were found
Scenario 4:
When artefact upload in DLM was partly (un)successful (HTTP status 407 Multi-Status), the DLM currently shows the status information in this way:
For consistency with the 3 above scenarios the DLM error message text should be reworded.
Thus instead of
staging:SIS-CC-reset space: Warning(s) in structure upload
Not Updated : Codelist OECD:CL_JENS (v1.0). Reason : no differences were found
Created : Codelist OECD:CL_JENS (v1.1). Success: Codelist OECD:CL_JENS (v1.1) was inserted.
it should display
Multi-status in structure upload into space staging:SIS-CC-reset:
Not Updated : Codelist OECD:CL_JENS (v1.0). Reason : no differences were found
Created : Codelist OECD:CL_JENS (v1.1). Success: Codelist OECD:CL_JENS (v1.1) was inserted.
Scenario 5:
When artefact upload failed due to empty fiel such as agency="" or version="", a CORS issue happens with a "failed status,
"
It can display
staging:SIS-CC-reset space: Error(s) in structure upload The application can not return a meaningful message from the system.
With Postman, we have a "status 400" with the message.
The 'agencyID' attribute is invalid - The value '' is invalid according to its datatype 'http://www.sdmx.org/resources/sdmxml/schemas/v2_1/common:NestedNCNameIDType' - The Pattern constraint failed. - Structure Fails Validation: {0}
If we can retrieve the appropriate status, the message can be:
staging:SIS-CC-reset space: Error(s) in structure upload Structure Fails Validation: The 'agencyID' attribute is invalid - The value '' is invalid according to its datatype
Note:
The full display of the SDMX "ErrorMessage" tag content is also to be applied for successful and unsuccessful structure delete actions. Because this feature is outside the upload screen, it has been described in a different ticket: #85 (closed)