windmill-labs / windmill-labs/windmill

bug: error displayed as empty

Open
#4,282 1 comment 0 reactions 1 assignee View on GitHub

@rubenfiszel is already working on this.

Since Aug 22, 2024.

bug
Dominant language
Rust
Stars
18k
Forks
1.1k
Avg merge
1d 1h
Merged PRs (30d)
328

Description

Describe the bug

I sometimes find myself having to log errors (in e.g. JS, also python afaik), as I don't see them output' in the UI
image

Otherwise I get nothing:
image

To reproduce
import { createDirectus as createDirectusClient, graphql, staticToken } from '@directus/sdk';

type Directus = {
  url: string,
  token: string
}

export async function main(
  directus: Directus,
  queryContent: string
) {
  const client = createDirectusClient(directus.url)
    .with(graphql()).with(staticToken(directus.token));

  const query = `
    query {
      ${queryContent}
    }
  `;

  try {
    const response = await client.query(query);
    return response;
  } catch (error) {
    console.error(error);
    throw error
  }
}
Expected behavior

error printed

Screenshots

No response

Browser information

No response

Application version

No response

Additional Context

let me know if I'm too spammy 🤔 (discord better?)

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.