windmill-labs / windmill

Open-source developer platform to power your entire infra and turn scripts into webhooks, workflows and UIs. Fastest workflow engine (13x vs Airflow). Open-source alternative to Retool and Temporal.
https://windmill.dev
Other
11.11k stars 547 forks source link

bug: error displayed as empty #4282

Open tennox opened 3 months ago

tennox commented 3 months ago

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 :thinking: (discord better?)

rubenfiszel commented 3 months ago

I can't reproduce too easily, would you have a code that doesn't require a resource that I could test with ? The fact that the console.error doesn't display anything make me think the error is empty but not certain