decoupled the way errors are handled

Signed-off-by: Blessing Osakue <iyoworks@gmail.com>