added error handler

Signed-off-by: Alexander Knapstein <alexander.knapstein@inspirationlabs.com>