MCPcopy Create free account
hub / github.com/ShipSecAI/studio / from

Method from

packages/component-sdk/src/errors.ts:89–102  ·  view source on GitHub ↗

* Create NetworkError from a Node.js/fetch network error

(error: Error)

Source from the content-addressed store, hash-verified

87 * Create NetworkError from a Node.js/fetch network error
88 */
89 static from(error: Error): NetworkError {
90 const message = error.message || 'Network error';
91 const details: Record<string, unknown> = {
92 originalName: error.name,
93 originalMessage: error.message,
94 };
95
96 // Extract network-specific details from common error patterns
97 if ('code' in error) {
98 details.code = (error as NodeJS.ErrnoException).code;
99 }
100
101 return new NetworkError(message, { cause: error, details });
102 }
103}
104
105/**

Callers 15

collectCandidatePathsFunction · 0.80
getToolSchemaFunction · 0.80
listMethod · 0.80
listMetadataMethod · 0.80
wrapErrorFunction · 0.80
getBodyTextFunction · 0.80
errors.test.tsFile · 0.80
context.test.tsFile · 0.80
decodeMethod · 0.80
SidebarFunction · 0.80

Calls

no outgoing calls

Tested by 7

buildChunkFunction · 0.64
listFunction · 0.64
listMethod · 0.64
encryptMethod · 0.64
decryptMethod · 0.64
listMethod · 0.64
findByRunIdMethod · 0.64