fix python error response