BadRequestException: property $defaultCode replaced with $code