You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the Semantic Hub application, both the POST and PUT APIs include two query parameters: status and type. The status parameter is a required field, with valid values being DRAFT, RELEASED, STANDARDIZED, and DEPRECATED.
Current Behavior
If the status parameter is passed with a null or blank value in either the POST or PUT API, the API currently returns a 500 Internal Server Error.
Expected Behavior
Both APIs should return a 400 Bad Request error when the status parameter is null or blank.
The error message should be descriptive, indicating that the status parameter could not be null or blank. Example: "status could not be null or blank (i.e., DRAFT, RELEASED, STANDARDIZED, DEPRECATED)".
Steps To Reproduce
For POST API:
Make a POST request to the relevant API endpoint.
Pass a null or blank value for the status parameter.
Observe that the API returns a 500 Internal Server Error.
For PUT API:
Make a PUT request to the relevant API endpoint.
Pass a null or blank value for the status parameter.
Observe that the API returns a 500 Internal Server Error.
Proposed Solution:
Add validation to check the status parameter before processing the request in both POST and PUT APIs. If null or blank, the APIs should return a 400 Bad Request response with an appropriate error message.
The text was updated successfully, but these errors were encountered:
Description
In the Semantic Hub application, both the POST and PUT APIs include two query parameters:
status
andtype
. Thestatus
parameter is a required field, with valid values being DRAFT, RELEASED, STANDARDIZED, and DEPRECATED.Current Behavior
If the
status
parameter is passed with anull
orblank
value in either the POST or PUT API, the API currently returns a500 Internal Server Error.
Expected Behavior
400 Bad Request error
when thestatus
parameter isnull
orblank
.status
parameter could not be null or blank. Example: "status could not be null or blank (i.e., DRAFT, RELEASED, STANDARDIZED, DEPRECATED)".Steps To Reproduce
For POST API:
null
orblank
value for thestatus
parameter.500 Internal Server Error.
For PUT API:
nul
l orblank
value for thestatus
parameter.500 Internal Server Error.
Proposed Solution:
Add validation to check the
status
parameter before processing the request in both POST and PUT APIs. Ifnull
orblank
, the APIs should return a 400 Bad Request response with an appropriate error message.The text was updated successfully, but these errors were encountered: