ofline/gallery: ajax error handle