I'm writing some code that uses a library written by a colleague that is not available to answer questions for an extended period of time, so I bring this question here. Since the code is internal stuff, I'll be substituting some names so bear with me. :)
The library is throwing an error whose type is fairly complex and involves generics with parameters. When I dump()
the error to console, I get something like this:
▿ ToolRuntime.ToolError.retryError
▿ retryError: ToolRuntime.ToolManagerError<DataLib.LookupDataValueError>.overseer
▿ overseer: (2 elements)
▿ .0: DataLib.LookupDataValueError.recordNotFoundException
▿ recordNotFoundException: DataLib.RecordNotFoundException
And so on (there's more but just data attached to the error that should be irrelevant -- but let me know if I'm wrong). Element 1 in the array overseer
is just the raw data returned from the server that was decoded into the error object.
I can't seem to catch this error. I need to know if this retryError
occurs, but nothing I've tried seems to result in catching it. Instead, the retryError
always falls through to my default error handler. I would expect that catch ToolRuntime.ToolError.retryError
would do the job, but it doesn't. If anyone can look at that and give me an idea what I'm missing, I'd sure appreciate it.