1

The function JsonToken.SelectToken(Text, var JsonToken) returns an optional boolean indicating whether exactly one token or more or less than one token was found. If the return value is used, no runtime error is thrown.

However, regardless of whether the return value is used and a runtime error is prevented, an error is written to the Error Cache (GetLastErrorMessage()), when eg. no token is available.

We're encountering this problem when JsonToken.SelectToken() is unintentionally executed in a background session by a third party and the background session's success is evaluated by getting the last error.

Is this behaviour desired or is it a bug?

Version: DE Business Central 24.5 (Platform 24.0.30985.0 + Application 24.5.23489.23968)

Category: Development
STATUS DETAILS
Needs Votes
Ideas Administrator

Thank you for this suggestion! Currently this is not on our roadmap. We are tracking this idea and if it gathers more votes and comments we will consider it in the future. Best regards, Business Central Team