ReadonlycauseThe underlying error (the failed hop's API or transport error).
ReadonlycontinuationThe ids of every hop created during the call, in order.
ReadonlycontinuationThe latest resumable continuation token. For streams this may be a mid-hop checkpoint: resuming from it re-generates any output yielded after the checkpoint.
ReadonlyinteractionThe id of the interaction that issued continuationToken (the value to
send as previous_interaction_id), or undefined if unknown or unstored
(store: false).
ReadonlypartialFor unary calls, the interaction merged from the hops that completed
(status requires_continuation, with the resumable continuation_token),
or undefined if no hop completed. Always undefined for streams, whose
events were already yielded.
OptionalstackStaticstackThe Error.stackTraceLimit property specifies the number of stack frames
collected by a stack trace (whether generated by new Error().stack or
Error.captureStackTrace(obj)).
The default value is 10 but may be set to any valid JavaScript number. Changes
will affect any stack trace captured after the value has been changed.
If set to a non-number value, or set to a negative number, stack traces will not capture any frames.
StaticcaptureCreates a .stack property on targetObject, which when accessed returns
a string representing the location in the code at which
Error.captureStackTrace() was called.
const myObject = {};
Error.captureStackTrace(myObject);
myObject.stack; // Similar to `new Error().stack`
The first line of the trace will be prefixed with
${myObject.name}: ${myObject.message}.
The optional constructorOpt argument accepts a function. If given, all frames
above constructorOpt, including constructorOpt, will be omitted from the
generated stack trace.
The constructorOpt argument is useful for hiding implementation
details of error generation from the user. For instance:
function a() {
b();
}
function b() {
c();
}
function c() {
// Create an error without stack trace to avoid calculating the stack trace twice.
const { stackTraceLimit } = Error;
Error.stackTraceLimit = 0;
const error = new Error();
Error.stackTraceLimit = stackTraceLimit;
// Capture the stack trace above function b
Error.captureStackTrace(error, b); // Neither function c, nor b is included in the stack trace
throw error;
}
a();
OptionalconstructorOpt: FunctionStaticprepare
Thrown when Interactions automatic continuation fails after progress.
interactions.create()withautomatic_continuationenabled (the default) may make several requests ("hops"), each one resuming the decode from the previous hop'scontinuation_token. If a hop fails after the server already produced (and billed) output in an earlier hop, or after a resumable checkpoint was reached, this error is thrown instead of the underlying error so the work is not lost. The underlying error iscause.To resume, pass
continuationTokenascontinuation_tokentointeractions.create(): withstoreenabled (the default), also passinteractionIdasprevious_interaction_idand noinput; withstore: false, resend the originalinput.