Azure / Azure/Connectors-NodeJS-SDK

Rename ConnectorException to ConnectorError (Azure SDK TypeScript naming convention)

Open
#33 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
0
Forks
4
Avg merge
2d 2m
Merged PRs (30d)
14

Description

## Context

The Node SDK uses `ConnectorException` following the .NET naming convention. Azure SDK TypeScript guidelines require the `Error` suffix for all error/exception types.

## Issue

```ts
// Current (follows .NET convention)
export class ConnectorException extends Error { ... }

// Azure SDK TypeScript guideline
export class ConnectorError extends Error { ... }
```

The [`@azure/core-rest-pipeline`](https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/core/core-rest-pipeline/src/restError.ts) package uses `RestError`, not `RestException`. All Azure SDK JS packages follow the `Error` suffix consistently.

## Proposed change

1. Rename `ConnectorException` → `ConnectorError` in `src/azureConnectors/connectorException.ts`
2. Update all imports and `catch` clauses across the codebase
3. Update the `throw new ConnectorException(...)` calls in all 12 generated `*Extensions.ts` files to `throw new ConnectorError(...)`
4. Update the barrel export in `src/azureConnectors/index.ts`

This is a **breaking change** — coordinate with the `@azure/core-rest-pipeline` adoption issue where `ConnectorError` would extend `RestError` instead of the built-in `Error`.

## Azure SDK guideline

[Error naming: use `Error` suffix](https://azure.github.io/azure-sdk/typescript_design.html#ts-error-types)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.