MCPcopy Create free account
hub / github.com/anomalyco/opencode / errorMessage

Function errorMessage

packages/app/src/components/prompt-input/submit.ts:211–218  ·  view source on GitHub ↗
(err: unknown)

Source from the content-addressed store, hash-verified

209 const pendingKey = (sessionID: string) => ScopedKey.from(sdk().scope, sessionID)
210
211 const errorMessage = (err: unknown) => {
212 if (err && typeof err === "object" && "data" in err) {
213 const data = (err as { data?: { message?: string } }).data
214 if (data?.message) return data.message
215 }
216 if (err instanceof Error) return err.message
217 return language.t("common.requestFailed")
218 }
219
220 const abort = async () => {
221 const sessionID = params.id

Callers 1

handleSubmitFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected