add error handler in book registration