refactor: cleanup error messages in TS examples