SuperAPI AI Directory

mir-error-handling

Coding & development

View repository

Updated 10-16 08:52

About this skill

error-handling

A skill that troubleshoots when an error occurs with the mir CLI.

Trigger

Use when the user encounters an error while running a mir command, or wants to investigate the cause of an error.

Error list and remedies

SnippetNotFoundError

snippet not found.

  • .mir/snippets/<name>.yaml と .mir/snippets/<name>/ directory'sbothcheck whether exists
  • it does not work with only one
  • check whether there is a typo in the snippet name

snippet name is invalid

  • ^[a-zA-Z0-9][a-zA-Z0-9-]*$ check whether it follows
  • alphanumeric characters and hyphens only, starting with an alphanumeric character

RegistryNotFoundError

registry not found.

  • mirconfig.yaml の registries check the settings
  • --registry check whether the name specified in exists
  • mir list check the registries available in

FileConflictError

a file with the same name already exists at the install destination.

  • when run in interactive mode, an overwrite confirmation prompt is displayed (yes/no/all)
  • --no-interactive when using, overwriting is skipped (--safe same as)
  • or manually move the existing file aside and then rerun

PathTraversalError

the template file name contains .. .

  • check whether the file path in the template directory contains .. check that it does not contain
  • fix the template file path

variable not specified (non-interactive mode)

--no-interactive a required variable is not specified when using.

  • specify with the CLI argument --変数名=値 specify
  • or set in the variable definitions of snippet.yaml default set

publish to remote registry failed

HTTP status Cause Remedy
401 publish_token is invalid reacquire the token and mirconfig.yaml update
403 insufficient permissions check the token's permissions
409 a snippet with the same name exists --force publish with overwrite using

YAML validation error

  • snippet.yaml が schema/v1/snippet.schema.json check whether it conforms to
  • required field name check whether is set
  • name check whether the field matches the file name

Procedure

  1. check the error message
  2. identify the corresponding error from the list above
  3. fix it according to the remedy
  4. after fixing, rerun the command and check that it works

if it cannot be resolved