Ajax resource is changed. Simple error handling is added.