Change ApiException's 'constant' to 'code'