# Example 3 - Node with Error (HTTP)

This example demonstrates error handling in FlowSync transactions. Building upon [Example 2 - Node with Error (HTTP)](https://docs.cybus.io/1-10-2/documentation/services/flowsync/flowsync-example-2), the configuration shows how to return custom error responses for HTTP requests. When a request is received, the system generates a response containing a specific HTTP error code (500) along with a custom error message, demonstrating how to handle error scenarios in your services using FlowSync.

* To call the HttpNode in the example below, run the following command:

{% code lineNumbers="true" %}

```yaml
curl --insecure \
--location 'https://127.0.0.1/data/flowsync/example3' \
--header 'Authorization: Bearer <replace with your token>'
```

{% endcode %}

For more information on the FlowSync configuration properties, see [Cybus:Node](https://docs.cybus.io/1-10-2/documentation/service-commissioning-files/resources/cybus-node#operation).

<figure><img src="https://602582052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fq3p17lWu5YRliiaKj1Yr%2Fuploads%2Fgit-blob-aed42bc0b87d9f107c2bb1540339bf35818c663d%2Fflowsync-example-3.png?alt=media" alt=""><figcaption></figcaption></figure>

{% file src="<https://602582052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fq3p17lWu5YRliiaKj1Yr%2Fuploads%2Fgit-blob-8de073d0f6577815074a216437aa091cfa1a7028%2Fflowsync-example-3-node-with-error-http.yaml?alt=media>" %}

{% code lineNumbers="true" %}

```yaml
description: FlowSync - Example 3

metadata:
    name: example 3
    version: 1.0.0

resources:
    testServer:
        type: Cybus::Server::Http
        properties:
            basePath: /FlowSync

    exampleNode:
        type: Cybus::Node::Http
        properties:
            parent: !ref testServer
            method: GET
            route: /example3
            operation: transaction

    exampleMappings:
        type: Cybus::Mapping
        properties:
            mappings:
                - subscribe:
                      endpoint: !ref exampleNode
                  publish:
                      endpoint: !ref exampleNode
                  rules:
                      - transform:
                            expression: >-
                                (
                                  {
                                    "id": $.id,
                                    "timestamp": $.timestamp,
                                    "error": {
                                      "code": 500,
                                      "message" : "This is an error message to your HTTP GET request."}
                                  }
                                )
```

{% endcode %}
