Show error message on invalid code