make sure we always have an id (#3431)
Signed-off-by: Jess Frazelle <github@jessfraz.com>
This commit is contained in:
@ -30,6 +30,15 @@ export async function submitTextToCadPrompt(
|
|||||||
token
|
token
|
||||||
)
|
)
|
||||||
|
|
||||||
|
// Make sure we have an id.
|
||||||
|
if (data instanceof Error) {
|
||||||
|
return data
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!data.id) {
|
||||||
|
return new Error('No id returned from Text-to-CAD API')
|
||||||
|
}
|
||||||
|
|
||||||
return data
|
return data
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user