switch to use .json instead of .send
Signed-off-by: Emma Indal <emma.indahl@gmail.com>
This commit is contained in:
@@ -6,7 +6,6 @@
|
||||
/// <reference types="node" />
|
||||
|
||||
import { Config } from '@backstage/config';
|
||||
import { CustomErrorBase } from '@backstage/errors';
|
||||
import { DocumentCollatorFactory } from '@backstage/plugin-search-common';
|
||||
import { DocumentDecoratorFactory } from '@backstage/plugin-search-common';
|
||||
import { DocumentTypeInfo } from '@backstage/plugin-search-common';
|
||||
@@ -115,7 +114,10 @@ export class LunrSearchEngineIndexer extends BatchSearchEngineIndexer {
|
||||
}
|
||||
|
||||
// @public
|
||||
export class MissingIndexError extends CustomErrorBase {}
|
||||
export class MissingIndexError extends Error {
|
||||
constructor(message?: string, cause?: Error | unknown);
|
||||
readonly cause?: Error | undefined;
|
||||
}
|
||||
|
||||
// @public
|
||||
export class NewlineDelimitedJsonCollatorFactory
|
||||
|
||||
@@ -14,10 +14,24 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { CustomErrorBase } from '@backstage/errors';
|
||||
import { isError } from '@backstage/errors';
|
||||
|
||||
/**
|
||||
* Failed to query documents for index that does not exist.
|
||||
* @public
|
||||
*/
|
||||
export class MissingIndexError extends CustomErrorBase {}
|
||||
export class MissingIndexError extends Error {
|
||||
/**
|
||||
* An inner error that caused this error to be thrown, if any.
|
||||
*/
|
||||
readonly cause?: Error | undefined;
|
||||
|
||||
constructor(message?: string, cause?: Error | unknown) {
|
||||
super(message);
|
||||
|
||||
Error.captureStackTrace?.(this, this.constructor);
|
||||
|
||||
this.name = this.constructor.name;
|
||||
this.cause = isError(cause) ? cause : undefined;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user