Skip to content

Commit

Permalink
Search sessions are disabled
Browse files Browse the repository at this point in the history
  • Loading branch information
lizozom committed Apr 6, 2021
1 parent fb72103 commit a3ac094
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -319,7 +319,7 @@ export class SearchSessionService
attributes: Partial<SearchSessionSavedObjectAttributes>
) => {
this.logger.debug(`update | ${sessionId}`);
if (!this.sessionConfig.enabled) throw new Error('Feature is disabled');
if (!this.sessionConfig.enabled) throw new Error('Search sessions are disabled');
await this.get(deps, user, sessionId); // Verify correct user
return deps.savedObjectsClient.update<SearchSessionSavedObjectAttributes>(
SEARCH_SESSION_TYPE,
Expand Down Expand Up @@ -357,7 +357,7 @@ export class SearchSessionService
user: AuthenticatedUser | null,
sessionId: string
) => {
if (!this.sessionConfig.enabled) throw new Error('Feature is disabled');
if (!this.sessionConfig.enabled) throw new Error('Search sessions are disabled');
this.logger.debug(`delete | ${sessionId}`);
await this.get(deps, user, sessionId); // Verify correct user
return deps.savedObjectsClient.delete(SEARCH_SESSION_TYPE, sessionId);
Expand Down Expand Up @@ -417,7 +417,7 @@ export class SearchSessionService
{ sessionId, isStored, isRestore }: ISearchOptions
) => {
if (!this.sessionConfig.enabled) {
throw new Error('Feature is disabled');
throw new Error('Search sessions are disabled');
} else if (!sessionId) {
throw new Error('Session ID is required');
} else if (!isStored) {
Expand Down

0 comments on commit a3ac094

Please sign in to comment.