Add Error message type

Some minor changes