NPM.ErrorMessage (NPM v0.6.0)

Copy Markdown View Source

Structured error formatting for npm operations.

Provides consistent, helpful error messages with suggestions for resolution.

Summary

Functions

Formats an error tuple into a user-friendly message.

Checks if an error is retryable.

Returns a suggestion for a given error.

Functions

format(arg)

@spec format({:error, atom()} | {:error, atom(), term()}) :: String.t()

Formats an error tuple into a user-friendly message.

retryable?(arg1)

@spec retryable?(atom()) :: boolean()

Checks if an error is retryable.

suggestion(arg1)

@spec suggestion(atom()) :: String.t() | nil

Returns a suggestion for a given error.