Skip to content

Add usable fields to error queue #167

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Sep 17, 2024
Merged

Conversation

soharab-ic
Copy link
Contributor

@soharab-ic soharab-ic commented Sep 9, 2024

  • Currently, If a MQT returns an error then we put an error log in error queue which is not very useful.
  • This PR will add a JSON string to the error queue with all the relevant values such as Message, HTTPEndpoint, ResponseBody and StatusCode etc.
{
    "FunctionHTTPRequest": {
        "Message": "{\"message_number\": 1, \"time_stamp\": \"2024-09-16T09:58:02Z\"}",
        "HTTPEndpoint": "http://router.fission/fission-function/kafka-consumer",
        "Headers": {
            "Content-Type": [
                "application/json"
            ],
            "KEDA-Error-Topic": [
                "error-topic"
            ],
            "KEDA-Response-Topic": [
                "response-topic"
            ],
            "KEDA-Source-Name": [
                "kafkatest"
            ],
            "KEDA-Topic": [
                "request-topic"
            ]
        }
    },
    "FunctionHTTPResponse": {
        "ResponseBody": "{\"MESSAGE_NUMBER\": 1, \"TIME_STAMP\": \"2024-09-16T09:58:02Z\"}",
        "StatusCode": 404,
        "ErrorString": "request returned failure: 404. http_endpoint: http://router.fission/fission-function/kafka-consumer, source: kafkatest"
    }
}

Fixes #166

Signed-off-by: Md Soharab Ansari <[email protected]>
Signed-off-by: Md Soharab Ansari <[email protected]>
Signed-off-by: Md Soharab Ansari <[email protected]>
@soharab-ic soharab-ic force-pushed the formatting-error-response branch from 567713a to 32530f8 Compare September 9, 2024 09:42
Signed-off-by: Md Soharab Ansari <[email protected]>
@sanketsudake sanketsudake merged commit 14e5b81 into main Sep 17, 2024
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Fission, queue and errors
2 participants