fix error with api_create_error