Issue:
[REFACTOR] Define the Mapping between `ConnectorError` and `ApiErrorResponse` using the `ErrorSwitch` trait

### Feature Description

Currently, we are mapping errors from `ConnectorError` to `ApiErrorResponse` using custom logic (can be found [here](https://github.com/juspay/hyperswitch/blob/cd0cf40fe29358700f92c1520475934752bb4b30/crates/router/src/core/webhooks/utils.rs#L52)).

We want to refactor this implementation to make use of the existing `ErrorSwitch` trait which satisfies the same usecase.


### Possible Implementation

We have a custom trait for conversion of error from `ConnectorError` to `ApiErrorResponse` as can be found using the link in the description above. The mapping has to be defined using the `ErrorSwitch` trait instead, and the custom trait can hence be deleted.

### Have you spent some time to check if this feature request has been raised before?

- [X] I checked and didn't find similar issue

### Have you read the Contributing Guidelines?

- [X] I have read the [Contributing Guidelines](https://github.com/juspay/hyperswitch/blob/main/docs/CONTRIBUTING.md)

### Are you willing to submit a PR?

No, but I'm happy to collaborate on a PR with someone else

Resolution:
<think>
PR Context:
- Title: refactor(router): remove `WebhookApiErrorSwitch ` and implement error mapping using `ErrorSwitch`
- Merged: 2023-07-17T17:57:01Z
- Files changed: 5 files
- Commits: 4 commits

Implementation approach:
## Type of Change
<!-- Put an `x` in the boxes that apply -->

- [ ] Bugfix
- [ ] New feature
- [ ] Enhancement
- [x] Refactoring
- [ ] Dependency updates
- [ ] Documentation
- [ ] CI/CD

## Description
<!-- Describe your changes in detail -->


### Additional Changes

- [ ] This PR modifies the API contract
- [ ] This PR modifies the database schema
- [ ] This PR modifies application configuration/environment variables

<!--
Provide links to the files with corresponding ch
</think>

To implement this, you'll need to modify:


**Detailed Implementation:**


**Commit 1:** refactor(router): remove `WebhookApiErrorSwitch ` and implement error mapping using `ErrorSwitch` (#
Files to modify:


**crates/router/src/core/errors.rs**
  Add:
    - mod: pub::transformers

**crates/router/src/core/errors/api_error_response.rs**
  Remove:
    - function: private::switch
    - impl: impl common_utils::errors::ErrorSwitch<api_models::errors::types::ApiErrorResponse> for ApiErrorResponse

**crates/router/src/core/errors/transformers.rs**
  Add:
    - function: private::switch
    - function: private::switch
    - impl: impl ErrorSwitch<api_models::errors::types::ApiErrorResponse> for ApiErrorResponse
    - impl: impl ErrorSwitch<ApiErrorResponse> for ConnectorError

**crates/router/src/core/webhooks.rs**
  Modify existing code

**crates/router/src/core/webhooks/utils.rs**
  Remove:
    - function: private::switch
    - trait: pub::WebhookApiErrorSwitch
    - impl: impl WebhookApiErrorSwitch<T> for errors::CustomResult<T, errors::ConnectorError>