Fix error handling with BrowserStack's API.