Error handling for cod parsing