updated for custom messages to error node