Improved error handling

Adding basic test on findElement, more test for error responses should also be added