Skip to content

Commit

Permalink
remove plural
Browse files Browse the repository at this point in the history
  • Loading branch information
neptunian committed Aug 5, 2024
1 parent d94b65c commit 58b5574
Showing 1 changed file with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ export interface RecalledEntry {
labels?: Record<string, string>;
}

function isModelMissingOrUnavailableErrors(error: Error) {
function isModelMissingOrUnavailableError(error: Error) {
return (
error instanceof errors.ResponseError &&
(error.body.error.type === 'resource_not_found_exception' ||
Expand Down Expand Up @@ -106,7 +106,7 @@ export class KnowledgeBaseService {

return Boolean(getResponse.trained_model_configs[0]?.fully_defined);
} catch (error) {
if (isModelMissingOrUnavailableErrors(error)) {
if (isModelMissingOrUnavailableError(error)) {
return false;
} else {
throw error;
Expand Down Expand Up @@ -166,7 +166,7 @@ export class KnowledgeBaseService {
} catch (error) {
this.dependencies.logger.debug('Error starting model deployment');
this.dependencies.logger.debug(error);
if (!isModelMissingOrUnavailableErrors(error)) {
if (!isModelMissingOrUnavailableError(error)) {
throw error;
}
}
Expand Down Expand Up @@ -407,7 +407,7 @@ export class KnowledgeBaseService {
namespace,
modelId,
}).catch((error) => {
if (isModelMissingOrUnavailableErrors(error)) {
if (isModelMissingOrUnavailableError(error)) {
throwKnowledgeBaseNotReady(error.body);
}
throw error;
Expand Down Expand Up @@ -548,7 +548,7 @@ export class KnowledgeBaseService {
})),
};
} catch (error) {
if (isModelMissingOrUnavailableErrors(error)) {
if (isModelMissingOrUnavailableError(error)) {
throwKnowledgeBaseNotReady(error.body);
}
throw error;
Expand Down Expand Up @@ -615,7 +615,7 @@ export class KnowledgeBaseService {

return Promise.resolve();
} catch (error) {
if (isModelMissingOrUnavailableErrors(error)) {
if (isModelMissingOrUnavailableError(error)) {
throwKnowledgeBaseNotReady(error.body);
}
throw error;
Expand Down

0 comments on commit 58b5574

Please sign in to comment.