Skip to content
This repository was archived by the owner on Jan 23, 2026. It is now read-only.
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions internal/errsystem/console.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import (

var Version string = "dev"

const baseDocURL = "https://agentuity.dev/errors/%s"
const baseDocURL = "https://agentuity.dev/Troubleshooting/error-codes/cli#%s"
const discordURL = "https://discord.gg/vtn3hgUfuc"

type crashReport struct {
Expand Down Expand Up @@ -94,6 +94,10 @@ func (e *errSystem) sendReport(filename string) {
}
}

func formatErrorAnchor(code errorType) string {
return strings.ToLower(code.Code) + "-" + strings.ReplaceAll(strings.ToLower(code.Message), " ", "-")
}

// ShowErrorAndExit shows an error message and exits the program.
// If the program is running in a terminal, it will wait for a key press
// and then upload the error report to the Agentuity team.
Expand Down Expand Up @@ -131,7 +135,7 @@ func (e *errSystem) ShowErrorAndExit() {
}
detail = append(detail, tui.Bold(tui.PadRight("Code:", 10, " "))+tui.Muted(e.code.Code))
detail = append(detail, tui.Bold(tui.PadRight("ID:", 10, " "))+tui.Muted(e.id))
detail = append(detail, tui.Bold(tui.PadRight("Doc:", 10, " "))+tui.Link(baseDocURL, e.code.Code))
detail = append(detail, tui.Bold(tui.PadRight("Doc:", 10, " "))+tui.Link(fmt.Sprintf(baseDocURL, formatErrorAnchor(e.code)), e.code.Code))
detail = append(detail, tui.Bold(tui.PadRight("Help:", 10, " "))+tui.Link(discordURL))
detail = append(detail, tui.Bold(tui.PadRight("", 10, " "))+tui.Link("support@agentuity.com"))
crashReportFile := e.writeCrashReportFile(stackTrace)
Expand Down
Loading