Updating commit count as well as basic error handling (just 401 for now)