server: Unify error handling in ImportResource

Signed-off-by: Jens Georg <mail@jensge.org>