working error handling for API via message block