error handler for 'type' action