Skip to content

Commit

Permalink
Merge branch 'main' into benbrown/endpointkey
Browse files Browse the repository at this point in the history
  • Loading branch information
benbrown authored Apr 27, 2021
2 parents a3837a7 + cd72a4d commit 1eb9096
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion Composer/packages/server/src/models/bot/builder.ts
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,16 @@ export class Builder {
await this.runQnaBuild(interruptionQnaFiles);
await this.runOrchestratorBuild(orchestratorBuildFiles, emptyFiles);
} catch (error) {
throw new Error(error.message ?? error.text ?? 'Error publishing to LUIS or QNA.');
// handle this special error case where QnA Maker returns this uninformative error.
// in their portal, it is accompanied by a message about the search service limits
// (A free search is limited to 3 indexes, which can be used up quickly)
if (error.text === 'Qnamaker build failed: Runtime error.') {
throw new Error(
'QnA Maker build failed: This error may indicate that your Search service requires an upgrade. For information about the Search service limits, see here: https://docs.microsoft.com/en-us/azure/search/search-limits-quotas-capacity'
);
} else {
throw new Error(error.message ?? error.text ?? 'Error publishing to LUIS or QNA.');
}
}
};

Expand Down

0 comments on commit 1eb9096

Please sign in to comment.