# Report an issue (https://s3.dimah.dev/docs/report-an-issue)

Open a GitHub issue when dimah-s3 does not do what its docs say, or when your
app needs something the library should own. Questions, ideas, and
vulnerabilities each have their own place.

| You have                                  | Where it goes                                                                                   |
| ----------------------------------------- | ----------------------------------------------------------------------------------------------- |
| Behavior that contradicts the docs        | [Bug report](https://github.com/dimah-kz/dimah-s3/issues/new?template=bug_report.yml)           |
| A feature the library should own          | [Feature request](https://github.com/dimah-kz/dimah-s3/issues/new?template=feature_request.yml) |
| A page that is wrong, unclear, or missing | [Documentation](https://github.com/dimah-kz/dimah-s3/issues/new?template=documentation.yml)     |
| A question, or an idea to talk through    | [Discussions](https://github.com/dimah-kz/dimah-s3/discussions)                                 |
| A vulnerability                           | [Private report](https://github.com/dimah-kz/dimah-s3/security/advisories/new)                  |

<Callout type="warn">
Never paste S3 credentials, `DIMAH_S3_SECRET`, or presigned URLs into an
issue. A presigned URL carries a signature that works until it expires. Report
a vulnerability privately, never in a public issue.
</Callout>

## Is it a bug? [#is-it-a-bug]

Most failures come from setup. Check these first:

- **The ticket secret.** `DIMAH_S3_SECRET` is set, at least 32 characters, and
  the same on every instance. See
  [Set the ticket secret](https://s3.dimah.dev/docs/server/setup#set-the-ticket-secret).
- **The `S3Client`.** The `S3_*` variables are right, and the client sets
  `requestChecksumCalculation: "WHEN_REQUIRED"`. See
  [Set the checksum mode](https://s3.dimah.dev/docs/providers#set-the-checksum-mode).
- **Bucket CORS.** The bucket allows your origin. See
  [Allow your origin in bucket CORS](https://s3.dimah.dev/docs/providers#allow-your-origin-in-bucket-cors).
- **Your own code.** A plain `Error` thrown from your `guard` or a hook answers
  `500 INTERNAL_ERROR`, and the server logs your error. See
  [Reporting errors](https://s3.dimah.dev/docs/server/errors#reporting-errors).
- **Versions.** Every `@dimah-s3/*` package is on the same version.

Then reproduce it on the newest release, and search
[open and closed issues](https://github.com/dimah-kz/dimah-s3/issues?q=is%3Aissue)
for the error `code` or message.

```bash
npm ls @dimah-s3/server @dimah-s3/core @dimah-s3/react
npm view @dimah-s3/server version
```

Fixes ship in the newest 2.x release. 1.x is no longer maintained, so
[upgrade to 2.0](https://s3.dimah.dev/docs/migration-2-0) before you report.

## Does it belong in dimah-s3? [#does-it-belong-in-dimah-s3]

dimah-s3 covers presigned upload, download, and delete on a bucket you own,
with the React client, the UI, `db()`, and share links around them. Request a
feature when all of these hold:

- It is part of that lifecycle.
- Your app cannot build it with a [hook](https://s3.dimah.dev/docs/server/hooks/upload), a
  [plugin](https://s3.dimah.dev/docs/server/plugins), or the AWS SDK without copying library
  internals.
- Other apps would need it too.

These stay in your app:

- Auth, ownership, and quotas. Your [`guard`](https://s3.dimah.dev/docs/server/hooks/global-guard)
  and hooks enforce them.
- List, copy, arbitrary tagging, and other general S3 operations. Call
  `@aws-sdk/client-s3` directly.
- Image and video transforms.

A plugin that only some apps need can ship as a
[community plugin](https://s3.dimah.dev/docs/server/community-plugins#list-your-plugin).

## What to include [#what-to-include]

A bug report needs:

- The version of every `@dimah-s3/*` package
- The server framework and the S3 provider
- What happened, with the error `code` the API returned, and what you expected
- The smallest reproduction. Start from `npx @dimah-s3/cli create` when you
  can, and link a public repository.
- Logs, with secrets removed
- Node.js, OS, browser, and package manager

A feature request needs the problem it solves, the call you want to write as a
code sample, and what you do today instead.

## For coding agents [#for-coding-agents]

A coding agent in an app that uses dimah-s3 follows these rules. Starter apps
point here from `AGENTS.md`, and the dimah-s3 agent skill carries the same
rules. To add either to an existing app, see
[Set up your coding agent](https://s3.dimah.dev/docs/quickstart#set-up-your-coding-agent).

### Raise it [#raise-it]

When dimah-s3 contradicts its docs, or the app needs a feature the library
should own, tell the user. Do not hide it behind a silent workaround. A
workaround in app code is fine when you name it as one and offer the report.

### Check first [#check-first]

Run the checks in [Is it a bug?](#is-it-a-bug) or
[Does it belong in dimah-s3?](#does-it-belong-in-dimah-s3). Then search for an
existing issue:

```bash
gh issue list --repo dimah-kz/dimah-s3 --state all --search "<error code or message>"
```

When an issue matches, give the user its link instead of a new draft.

### Draft and ask [#draft-and-ask]

Draft the report from [What to include](#what-to-include), with secrets
removed, and show it to the user. Suggest a report once per problem. Never
file one without the user's explicit yes.

### Hand over a link [#hand-over-a-link]

Give the user a link to review and submit. It fills the form's text fields by
their `id`:

| Template        | `template=`           | Text fields                                                                                           |
| --------------- | --------------------- | ----------------------------------------------------------------------------------------------------- |
| Bug report      | `bug_report.yml`      | `title`, `version`, `description`, `expected`, `reproduce`, `reproduction-url`, `logs`, `environment` |
| Feature request | `feature_request.yml` | `title`, `problem`, `proposal`, `alternatives`                                                        |
| Documentation   | `documentation.yml`   | `title`, `url`, `problem`, `suggestion`                                                               |

```txt
https://github.com/dimah-kz/dimah-s3/issues/new?template=bug_report.yml&title=%5BBug%5D%3A%20Confirm%20fails%20after%20resume&version=2.4.0
```

- Keep the title prefix the template sets: `[Bug]: `, `[Feature]: `, or
  `[Docs]: `.
- Keep the link short. The user pastes logs and long text into the form.
- Leave out `labels=`. GitHub answers 404 to anyone who cannot label issues,
  and the template adds its own labels.
- The user picks the dropdowns (packages, framework, provider) in the form.

### File only when asked [#file-only-when-asked]

When the user asks you to file it and `gh` is signed in as them, create the
issue with the template's title prefix, and the form's field labels as `###`
headings in the body:

```bash
gh issue create --repo dimah-kz/dimah-s3 --title "[Bug]: Confirm fails after resume" --body-file issue.md
```

Then give the user the issue URL.

### Keep vulnerabilities private [#keep-vulnerabilities-private]

Point the user to the
[private report](https://github.com/dimah-kz/dimah-s3/security/advisories/new)
form. Never draft a public issue for a vulnerability.