get_error_msg now returns const char * and handles missing status messages