#How do I get the error message and error code from a failed execution?

1 messages · Page 1 of 1 (latest)

tawdry pewter
#

When I execute this in the playground

query {
  container {
    from(address: "alpine") {
      withExec(args: ["apk", "add", "curl"]) {
        withExec(args: ["/bin/ash","-c", "cul https://dagger.io/"]) {
          stdout
          stderr
          exitCode
        }
      }
    }
  }
}

I expect to have something like this

{
  "data": {
    "container": {
      "from": {
        "withExec": {
          "withExec": {
            "exitCode": 1,
            "stderr": "ash: cul: not found",
            "stdout": ""
          }
        }
      }
    }
  },
}

But instead I get this

{
  "data": {
    "container": {
      "from": {
        "withExec": {
          "withExec": {
            "exitCode": null,
            "stderr": null,
            "stdout": null
          }
        }
      }
    }
  },

Which is not useful because I don't know why it failed.
Notice that I have use

withExec(args: ["/bin/ash","-c", "cul https://dagger.io/"])

But also it expect it to work with

withExec(args: ["cul","https://dagger.io/"])

with a response

          "withExec": {
            "exitCode": 1,
            "stderr": "/bin/sh: cul: not found",
            "stdout": ""
          }

PD: removed some lines because discord didn't allow me

upper oxide
#

cc @somber haven @vital valve

somber haven
#

Not playground related. There's an issue opened in dagger/dagger about this. cc @radiant ether @jolly verge

radiant ether
#

@tawdry pewter

          "withExec": {
            "exitCode": null,
            "stderr": null,
            "stdout": null
          }

^^^ do you get exactly this, or no response at all (and an error)?

somber haven
tawdry pewter
#

@radiant ether with an error not related to the query, i remove it because of discord

radiant ether
#

(it's pretty hard to solve actually for a few reasons)