[{"position":["let","checkUser","if","is_null","from"],"code":"instance not found","description":"No key found for secret 13bfc31c.....","failures":null}]
Do you have any ideas how I can catch the KeyFromSecret error and change it?
KeyFromSecret will immediately fail if the secret is invalid, so there is no way to “catch” the error in the current FQL API.
What you may try instead is to create a new client with the secret in order to use CurrentIdentity(). CurrentIdentity() returns a Ref to the instance of a Token.
If the secret does not exist, then the client request will immediately fail with either an invalid secret or unauthorized, which might be more helpful than “no key found for secret”.