error handling on space editing and image uploading