MCPcopy Create free account
hub / github.com/Dstack-TEE/dstack / safeReject

Function safeReject

sdk/js/src/send-rpc-request.ts:17–22  ·  view source on GitHub ↗
(error: Error)

Source from the content-addressed store, hash-verified

15 let isCompleted = false
16
17 const safeReject = (error: Error) => {
18 if (!isCompleted) {
19 isCompleted = true
20 reject(error)
21 }
22 }
23
24 const safeResolve = (result: T) => {
25 if (!isCompleted) {

Callers 2

send_rpc_requestFunction · 0.85
onAbortFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected