intercom / intercom-node

Node.js bindings for the Intercom API
https://developers.intercom.com
Other
362 stars 116 forks source link

createDataAttribute returns a 500 #391

Open Eclairemoy opened 7 months ago

Eclairemoy commented 7 months ago

createDataAttribute for a contact is broken

For feature requests please contact us at team@intercom.io

Version info

Expected behavior

200 OK with the creation of the attribute

Actual behavior

Error: Server Error at new BadResponseError (/Users/elizabethmoy/Documents/zendesk_prototyping/final_examples/import_tickets/sdk test/node_modules/intercom-client/dist/errors/badResponse.error.js:22:28) at Client.checkOnErrorInResponse (/Users/elizabethmoy/Documents/zendesk_prototyping/final_examples/import_tickets/sdk test/node_modules/intercom-client/dist/client.js:308:16) at Client. (/Users/elizabethmoy/Documents/zendesk_prototyping/final_examples/import_tickets/sdk test/node_modules/intercom-client/dist/client.js:218:36) at step (/Users/elizabethmoy/Documents/zendesk_prototyping/final_examples/import_tickets/sdk test/node_modules/intercom-client/dist/client.js:52:23) at Object.throw (/Users/elizabethmoy/Documents/zendesk_prototyping/final_examples/import_tickets/sdk test/node_modules/intercom-client/dist/client.js:33:53) at rejected (/Users/elizabethmoy/Documents/zendesk_prototyping/final_examples/import_tickets/sdk test/node_modules/intercom-client/dist/client.js:25:65) at processTicksAndRejections (node:internal/process/task_queues:96:5) { body: { type: 'error.list', request_id: '0003pkg9bkp3mqbd9970', errors: [ { code: 'server_error', message: 'Server Error' } ] }, headers: { date: 'Thu, 07 Dec 2023 11:34:16 GMT', 'content-type': 'application/json; charset=utf-8', 'transfer-encoding': 'chunked', connection: 'close', status: '500 Internal Server Error', 'x-ratelimit-limit': '5000', 'x-ratelimit-reset': '1701948861', vary: 'Accept,Accept-Encoding', 'x-ratelimit-remaining': '5000', 'x-intercom-version': '9414fdcdc6a6fcf725ece9df5c77bb92f6b87a64', 'x-request-id': '0003pkg9bkp3mqbd9970', 'x-frame-options': 'SAMEORIGIN', 'cache-control': 'no-cache', 'strict-transport-security': 'max-age=31556952; includeSubDomains; preload', 'x-xss-protection': '1; mode=block', 'x-request-queueing': '0', 'intercom-version': '2.1', 'x-runtime': '0.096447', 'x-content-type-options': 'nosniff', server: 'nginx' }, statusCode: 500 }

Steps to reproduce

  1. Run async function createContactAttribute() { const response = await client.dataAttributes.create({ name: 'test', model: Intercom.ModelType.COMPANY, data_type: Intercom.DataType.STRING, description: 'test', options: [{ value: 'yey' }, { value: 'yoy' }] }); console.log(response) }

Logs