Bugfix for TokenResource error handling when the URI did not match