extract error into a new module called myna