Change how error messages are assigned when handling errors