Skip to content

Commit e2350f9

Browse files
fix: addressing PR comments
1 parent 78f7783 commit e2350f9

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

src/providers/meshy/api.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ const MeshyAPIConfig: ProviderAPIConfig = {
1212
};
1313
},
1414
getEndpoint: ({ fn, gatewayRequestURL }) => {
15-
const basePath = gatewayRequestURL.split('/v1')?.[1];
15+
const basePath = gatewayRequestURL.split('/v1')?.[1] ?? '';
1616

1717
switch (fn) {
1818
case 'modelGenerate':

src/providers/meshy/modelGenerate.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -41,13 +41,13 @@ export const MeshyModelGenerateResponseTransform: (
4141
return generateInvalidProviderResponseError(response, MESHY);
4242
}
4343

44-
if ('result' in response) {
44+
if ('result' in response && typeof response.result === 'string') {
4545
return {
4646
result: response.result,
47-
id: response.id,
48-
status: response.status,
49-
created_at: response.created_at,
50-
expires_at: response.expires_at,
47+
id: response.id ?? undefined,
48+
status: response.status ?? undefined,
49+
created_at: response.created_at ?? undefined,
50+
expires_at: response.expires_at ?? undefined,
5151
};
5252
}
5353

0 commit comments

Comments
 (0)