Expand tests, fix error reporting on XHR error state.