tailcall: `ValidationError` doesn't fail with exit code 1

Prerequisites

  • I have checked the existing issues to ensure this is not a duplicate.
  • I am running the latest version of Tailcall.

Describe the bug

TC server when pointed to an invalid file, throws an validation error but exits with status code 0.

Steps to reproduce

  1. Create the following file test.graphql

    schema @schema {
      query: Query
    }
    
    type Query {
      users: [User] @http(path: "/users")
    }
    
  2. Run the check command on the file

      tc check ./assets/jsonplaceholder.graphql
      Validation Error
        • No base URL defined [Query, users, @http]
    
      echo $?
      0 # should be 1
    

Expected behavior

Fail with exit code Err.

Actual behavior

Fails with exit code OK.

Environment information:

  • Operating System: All
  • Tailcall Version: 0.9.0
  • GraphQL Client/version NA

Additional context

Learn more about exit codes here — https://rust-cli.github.io/book/in-depth/exit-code.html **

About this issue

  • Original URL
  • State: closed
  • Created 9 months ago
  • Comments: 16 (12 by maintainers)

Most upvoted comments

I would prefer one.

@ayewo we could use 78. We could use the exit code crate for this also — https://docs.rs/exitcode/latest/src/exitcode/lib.rs.html#89