Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bug: error displayed as empty #4282

Open
tennox opened this issue Aug 22, 2024 · 1 comment
Open

bug: error displayed as empty #4282

tennox opened this issue Aug 22, 2024 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@tennox
Copy link
Contributor

tennox commented Aug 22, 2024

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?)

@tennox tennox added the bug Something isn't working label Aug 22, 2024
@tennox tennox changed the title bug: bug: error displayed as empty Aug 22, 2024
@rubenfiszel
Copy link
Contributor

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants