Issue:
refactor(core): add error handling wrapper to wehbook

## 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 -->
In webhook, for specific connectors, we want to consume every webhook that arrives even if a error occurs while processing. This is done to keep the webhook channel open with the connector. 
In this pr, a error wrapper is introduced to handle this logic where based on connector, we choose whether to send error or not.

### 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 changes.

Following are the paths where you can find config files:
1. `config`
2. `crates/router/src/configs`
3. `loadtest/config`
-->


## Motivation and Context
<!--
Why is this change required? What problem does it solve?
If it fixes an open issue, please link to the issue here.

If you don't have an issue, we'd recommend starting with one first so the PR
can focus on the implementation (unless it is an obvious bug or documentation fix
that will have little conversation).
-->


## How did you test it?
<!--
Did you write an integration/unit/API test to verify the code changes?
Or did you test this change manually (provide relevant screenshots)?
-->

Tested through Postman:
- Create a MCA (Adyenplatform):
- Setup webhook endpoint in dashboard (Adyenplatform):
- Create a payout:
```
{
    "amount": 100,
    "currency": "EUR",
    "customer_id": "sakilcust",
    "email": "payout_customer@example.com",
    "phone": "999999999",
    "phone_country_code": "+65",
    "description": "Its my first payout request",
    "payout_type": "bank",
    "priority": "instant",
    "payout_method_data": {
        "bank": {
            "iban": "DE89370400440532013000"
        }
    },
    "billing": {
        "address": {
            "line1": "Raadhuisplein",
            "line2": "92",
            "city": "Hoogeveen",
            "state": "FL",
            "zip": "7901 BW",
            "country": "NL",
            "first_name": "John",
            "last_name": "Doe"
        },
        "phone": {
            "number": "0650242319",
            "country_code": "+31"
        }
    },
    "entity_type": "Individual",
    "recurring": true,
    "confirm": true,
    "auto_fulfill": true
}
```
- You should receive webhook for the following payout to the endpoint mentioned during merchant creation

Case 2:
- Setup `ngrok` to intercept webhook
- Create a payout (same body as above)
- delete the `payout_attempt` from the payout_attempt table against the generated `payout_id`
- See the log in ngrok for response sent to the adyenplatform
- The status should be 200 with `x-http-code` present in headers

## Checklist
<!-- Put an `x` in the boxes that apply -->

- [x] I formatted the code `cargo +nightly fmt --all`
- [x] I addressed lints thrown by `cargo clippy`
- [x] I reviewed the submitted code
- [ ] I added unit tests for my changes where possible


Resolution:
<think>
PR Context:
- Title: refactor(core): add error handling wrapper to wehbook
- Merged: 2024-11-27T18:14:17Z
- Files changed: 12 files
- Commits: 1 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 -->
In webhook, for specific connectors, we want to consume every webhook that arrives even if a error occurs while processing. This is done to keep the webhook channel open with the connector. 
In this pr, a error wrapper is introduced to handle
</think>

To implement this, you'll need to modify:


**Detailed Implementation:**


**Commit 1:** refactor(core): add error handling wrapper to wehbook (#6686)
Files to modify:


**crates/api_models/src/connector_enums.rs**
  Add:
    - function: pub::should_acknowledge_webhook_for_resource_not_found_errors

**crates/hyperswitch_connectors/src/connectors/cashtocode.rs**
  Modify existing code

**crates/hyperswitch_connectors/src/connectors/worldline.rs**
  Modify existing code

**crates/hyperswitch_connectors/src/connectors/zen.rs**
  Modify existing code

**crates/hyperswitch_connectors/src/connectors/zsl.rs**
  Modify existing code

**crates/hyperswitch_interfaces/src/webhooks.rs**
  Add:
    - function: private::from
    - enum: pub::IncomingWebhookFlowError
    - impl: impl From<&ApiErrorResponse> for IncomingWebhookFlowError

**crates/router/src/connector/adyen.rs**
  Modify existing code

**crates/router/src/connector/adyenplatform.rs**
  Add:
    - function: private::get_webhook_api_response

**crates/router/src/connector/braintree.rs**
  Modify existing code

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

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

**crates/router/src/services/connector_integration_interface.rs**
  Modify existing code