MCPcopy Create free account
hub / github.com/di-sukharev/opencommit / makeMessage

Method makeMessage

out/cli.cjs:68958–68970  ·  view source on GitHub ↗
(status, error, message)

Source from the content-addressed store, hash-verified

68956};
68957var APIError = class _APIError extends AnthropicError {
68958 constructor(status, error, message, headers) {
68959 super(`${_APIError.makeMessage(status, error, message)}`);
68960 this.status = status;
68961 this.headers = headers;
68962 this.error = error;
68963 }
68964 static makeMessage(status, error, message) {
68965 const msg = error?.message ? typeof error.message === "string" ? error.message : JSON.stringify(error.message) : error ? JSON.stringify(error) : message;
68966 if (status && msg) {
68967 return `${status} ${msg}`;
68968 }
68969 if (status) {
68970 return `${status} status code (no body)`;
68971 }
68972 if (msg) {
68973 return msg;

Callers 1

constructorMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected