Files
botpress--botpress/packages/client/e2e/node.ts
T
2026-07-13 13:34:48 +08:00

26 lines
471 B
TypeScript

import { Client, errorFrom } from '../src'
const main = async () => {
const client = new Client()
await client
.getAccount({})
.then(() => {
throw new Error('Expected to reject')
})
.catch((err) => {
if (errorFrom(err).type !== 'Unauthorized') {
throw Error()
}
})
}
void main()
.then(() => {
console.error('Node Done')
process.exit(0)
})
.catch((err) => {
console.error(err)
process.exit(1)
})