Throwing exception from editPost method