Beta
Whether error is an error response from the Context API, with a code to branch on.
error
code
try { await client.context.request('POST /knowledge-bases/{knowledgeBaseId}/build')} catch (error) { if (isContextApiError(error) && error.response.body.code === 'buildInFlight') { // a build is already running }} Copy
try { await client.context.request('POST /knowledge-bases/{knowledgeBaseId}/build')} catch (error) { if (isContextApiError(error) && error.response.body.code === 'buildInFlight') { // a build is already running }}
Whether
erroris an error response from the Context API, with acodeto branch on.