npm package diff
Package: @forge/events
Versions: 2.0.1-next.0 - 2.0.1-next.1
File: package/src/invocationError.ts
Index: package/src/invocationError.ts
===================================================================
--- package/src/invocationError.ts
+++ package/src/invocationError.ts
@@ -1,22 +0,0 @@
-import { DEFAULT_RETRY_OPTIONS, MIN_RETRY_AFTER, RetryOptions } from './retryOptions';
-import { Response } from './queueResponse';
-
-export class InvocationError extends Response {
- constructor(public retryOptions: RetryOptions = DEFAULT_RETRY_OPTIONS) {
- super(true);
- if (this.retryOptions.retryAfter !== undefined && this.retryOptions.retryAfter <= 0) {
- this.retryOptions.retryAfter = MIN_RETRY_AFTER;
- }
- return this.toJSON() as unknown as InvocationError;
- }
-
- /***
- * Function to convert class object to JSON object so that app function return this as part of lambda invocation.
- */
- public toJSON(): { _retry: boolean; retryOptions: RetryOptions } {
- return {
- _retry: this._retry,
- retryOptions: this.retryOptions
- };
- }
-}