updateToken: add more context to errors