Skip to main content

When executing a JSON request (by Postman), I get an 422 - Unprocessable Entity Error. In the Indicium log, the following error message can be traced. What does this error mean? 

"DBG] Endpoint '"{metaSourceAliasOrID:length(2,3):regex(^iam$|^api$|^sf$)}/{guiApplAliasOrID}/{**odataRoute}"' with route pattern '"{metaSourceAliasOrID:length(2,3):regex(^iam$|^api$|^sf$)}/{guiApplAliasOrID}/{**odataRoute}"' is valid for the request path '"/iam/test/customer"' (430aaaf2)
/DBG] Endpoint '"{protocolSegment:length(4,5):regex(^odata$|^open$)}/{metaSourceAliasOrID:length(2,3):regex(^iam$|^api$|^sf$)}/{guiApplAliasOrID}/{**odataRoute}"' with route pattern '"{protocolSegment:length(4,5):regex(^odata$|^open$)}/{metaSourceAliasOrID:length(2,3):regex(^iam$|^api$|^sf$)}/{guiApplAliasOrID}/{**odataRoute}"' was rejected by constraint '"protocolSegment"':'"Microsoft.AspNetCore.Routing.Constraints.LengthRouteConstraint"' with value '"iam"' for the request path '"/iam/test/customer"' (5b506098)
/DBG] Endpoint '"{protocolSegment:length(4,5):regex(^odata$|^open$)}/{metaSourceAliasOrID:length(2,3):regex(^iam$|^api$|^sf$)}/{guiApplAliasOrID}/{**odataRoute}"' with route pattern '"{protocolSegment:length(4,5):regex(^odata$|^open$)}/{metaSourceAliasOrID:length(2,3):regex(^iam$|^api$|^sf$)}/{guiApplAliasOrID}/{**odataRoute}"' is not valid for the request path '"/iam/test/customer"' (4df8d1d7)

Is there a possibility to return this message(s) directly to Indicium as a result? Because error messages with a certain error can have different causes, reading the log is difficult/unworkable for 3rd parties. 

In most cases when we return a 422, there should be a TSFMessages header in the response.

That message is base64 encoded and can be decoded here: https://www.base64decode.org/
We are in the process of adding this to the documentation, but it is not finished yet.

Can you check if the TSFMessages header is available?


In most cases when we return a 422, there should be a TSFMessages header in the response.

That message is base64 encoded and can be decoded here: https://www.base64decode.org/
We are in the process of adding this to the documentation, but it is not finished yet.

Can you check if the TSFMessages header is available?


After decoding we've got the following message:

❌ {"MessageType":"IndiciumMessage","MessageID":"unknown_error","NamedParameters":null,"RawMessage":null,"TranslatedMessage":null}


That error is sadly enough not very helpful. It is probably an error from a database stored procedure. We hide those errors, as they might contain sensitive information.

I will make an issue on our side to at least log the error to the Indicium log file, because this is not actionable.

It is possible to get the error by running Indicium in Development mode, to do this the web.config file must be changed like below:

<aspNetCore processPath="dotnet" arguments=".\Indicium.dll" stdoutLogEnabled="false" stdoutLogFile=".\logs\stdout" forwardWindowsAuthToken="false" hostingModel="InProcess">
<environmentVariables>
<environmentVariable name="ASPNETCORE_ENVIRONMENT" value="Development" />
</environmentVariables>
</aspNetCore>

Can you try if that make the error more clear?