Raising exception if request had an error