Skip to content

Commit cd98aaf

Browse files
authored
feat(generative-ai): get mock data schema in AtlasAiService CLOUDP-333849 (#7225)
1 parent a00c30f commit cd98aaf

File tree

6 files changed

+469
-9
lines changed

6 files changed

+469
-9
lines changed

package-lock.json

Lines changed: 18 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/compass-generative-ai/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,8 @@
6767
"react": "^17.0.2",
6868
"react-redux": "^8.1.3",
6969
"redux": "^4.2.1",
70-
"redux-thunk": "^2.4.2"
70+
"redux-thunk": "^2.4.2",
71+
"zod": "^3.25.76"
7172
},
7273
"devDependencies": {
7374
"@mongodb-js/connection-info": "^0.17.2",
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
/**
2+
* Occurs when the input to the AtlasAiService is understood but invalid.
3+
*/
4+
class AtlasAiServiceInvalidInputError extends Error {
5+
constructor(message: string) {
6+
super(message);
7+
this.name = 'AtlasAiServiceInvalidInputError';
8+
}
9+
}
10+
11+
/**
12+
* Thrown when the API response cannot be parsed into the expected shape..
13+
*/
14+
class AtlasAiServiceApiResponseParseError extends Error {
15+
constructor(message: string) {
16+
super(message);
17+
this.name = 'AtlasAiServiceApiResponseParseError';
18+
}
19+
}
20+
21+
export { AtlasAiServiceInvalidInputError, AtlasAiServiceApiResponseParseError };

0 commit comments

Comments
 (0)