# My task is failing because of a permissions problem. Why?

Mechanic works hard to detect necessary permissions, and prompt you for them up front. If you see an error message like this one, it means that Mechanic wasn't able to detect everything necessary ahead of time.

This issue can almost always be solved by generating the right preview actions, demonstrating to Mechanic what exactly you intend to do. When you're working on your task code, look at the "Preview" section, and work to make sure that all of the important Shopify actions show up there.

**Start learning about previews here:** [**Core / Tasks / Previews**](/core/tasks/previews.md)

{% hint style="info" %}
As an alternative to previews, you can use the [`{% permissions %}` tag](/platform/liquid/tags/permissions.md) to explicitly declare the scopes your task needs. See [Permissions](/core/tasks/permissions.md) for a full overview of both approaches.
{% endhint %}

{% hint style="info" %}
Having trouble getting your permissions and previews to line up? Try asking in our [community Slack workspace](/resources/slack.md). Sharing your task code there is a good way to get suggestions about how to move forward. :)
{% endhint %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://learn.mechanic.dev/faq/my-task-is-failing-because-of-a-permissions-problem.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
