Find error code in API response with regex