improve chrome extension error handling