hasura / hasura/graphql-engine

'http exception when calling webhook' on localhost

Open
#9,012 3 comments 0 reactions 0 assignees View on GitHub
k/bug t/gql-services
Dominant language
TypeScript
Stars
32.1k
Forks
3k
PR merge metrics
PR metrics pending

Description

### Discussed in https://github.com/hasura/graphql-engine/discussions/8979

Originally posted by **kdichev** September 18, 2022
Hi, I am developing locally with hasura running with docker-composed container on port 8080, I have a functions api on port 8000. I've setup my action with env variable as so `{{ACTION_BASE_URL}}/subscriptions-config` and the value of the variable is `http://host.docker.internal:8000/api`. When I call the action I get `'http exception when calling webhook'`, but I am using the same approach for hasura events that calls the same functions api which work as expected. Shouldn't this just work for actions as well? Seems like a bug. I am on a mac machine. I've seen a few similar issues here but seems like it's hacks rather than real solutions (I would expect actions to work as events work with this workflow)

```
{
"errors": [
{
"extensions": {
"code": "unexpected",
"internal": {
"error": {
"message": "Connection failure",
"request": {
"host": "host.docker.internal",
"method": "POST",
"path": "/api/subscriptions-config",
"port": 8000,
"queryString": "",
"requestHeaders": {
"Content-Type": "application/json",
"User-Agent": "hasura-graphql-engine/v2.11.1",
"X-B3-ParentSpanId": "c7bed813e6d658f6",
"X-B3-SpanId": "b9ecef585bda4388",
"X-B3-TraceId": "57a3623d4c669c18"
},
"responseTimeout": "ResponseTimeoutMicro 30000000",
"secure": false
},
"type": "http_exception"
},
"request": {
"body": {
"action": {
"name": "stripe_price"
},
"input": {
"currency": "bgn"
},
"request_query": "query MyQuery {\n stripe_price(currency: \"bgn\") {\n id\n unit_amount\n }\n}\n",
"session_variables": {
"x-hasura-role": "admin"
}
},
"headers": [],
"transformed_request": null,
"url": "{{ACTION_BASE_URL}}/subscriptions-config"
},
"response": null
},
"path": "$"
},
"message": "http exception when calling webhook"
}
]
}
```

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.