Coder Social home page Coder Social logo

Comments (7)

tflanagan avatar tflanagan commented on August 26, 2024

What you have looks fine. The file returned from downloadFile should be base64, which is what is expected for the data property when uploading the file.

If you enable debugging DEBUG=quickbase:* before running your code, you'll see the ins/outs of all the API calls.

Do you mind scrubbing it of sensitive information and pasting it here?

I'd be looking for that upsert commands request and response objects.


PS: You'll want to return the qb.upsert promise so you don't break your promise chain.

 qb.downloadFile({
      "tableId":"foo",
      "fieldId":"10",
      "recordId":"123",
      "versionNumber":1
  }).then(file => {
     return qb.upsert({
          "tableId": "bar",
          "data": [{
             "10": {"value": {"filename":"test.pptx","data":file}},
             "20": {"value": 584}
          }]
   })

from node-quickbase.

7elephants avatar 7elephants commented on August 26, 2024

@tflanagan Thanks for the above...all the promises are chained :)

Below is the quickbase debug you asked for

quickbase:response 1056 {
2024-05-01 12:36:42   status: 207,
2024-05-01 12:36:42   statusText: 'Multi-Status',
2024-05-01 12:36:42   headers: {
2024-05-01 12:36:42     date: 'Wed, 01 May 2024 16:36:42 GMT',
2024-05-01 12:36:42     'content-type': 'application/json; charset=utf-8',
2024-05-01 12:36:42     'transfer-encoding': 'chunked',
2024-05-01 12:36:42     connection: 'keep-alive',
2024-05-01 12:36:42     'qb-api-ray': 'c20ed0e6-abc6-4fe6-9223-7d182849e48d',
2024-05-01 12:36:42     'access-control-allow-origin': '*',
2024-05-01 12:36:42     'access-control-expose-headers': 'qb-api-ray,x-ratelimit-remaining,x-ratelimit-limit,x-ratelimit-reset,content-disposition,retry-after',
2024-05-01 12:36:42     'x-content-type-options': 'nosniff',
2024-05-01 12:36:42     'x-frame-options': 'SAMEORIGIN',
2024-05-01 12:36:42     'strict-transport-security': 'max-age=31536000; includeSubDomains',
2024-05-01 12:36:42     vary: 'Accept-Encoding',
2024-05-01 12:36:42     'cf-cache-status': 'DYNAMIC',
2024-05-01 12:36:42     'content-security-policy': "default-src * 'unsafe-eval' 'unsafe-inline' data: filesystem: about: blob: ws: wss:",
2024-05-01 12:36:42     server: 'cloudflare',
2024-05-01 12:36:42     'cf-ray': '87d130dcaace43b1-EWR'
2024-05-01 12:36:42   },
2024-05-01 12:36:42   config: {
2024-05-01 12:36:42     transitional: {
2024-05-01 12:36:42       silentJSONParsing: true,
2024-05-01 12:36:42       forcedJSONParsing: true,
2024-05-01 12:36:42       clarifyTimeoutError: false
2024-05-01 12:36:42     },
2024-05-01 12:36:42     adapter: [Function: httpAdapter],
2024-05-01 12:36:42     transformRequest: [ [Function: transformRequest] ],
2024-05-01 12:36:42     transformResponse: [ [Function: transformResponse] ],
2024-05-01 12:36:42     timeout: 0,
2024-05-01 12:36:42     xsrfCookieName: 'XSRF-TOKEN',
2024-05-01 12:36:42     xsrfHeaderName: 'X-XSRF-TOKEN',
2024-05-01 12:36:42     maxContentLength: -1,
2024-05-01 12:36:42     maxBodyLength: -1,
2024-05-01 12:36:42     env: { FormData: [Function] },
2024-05-01 12:36:42     validateStatus: [Function: validateStatus],
2024-05-01 12:36:42     headers: {
2024-05-01 12:36:42       Accept: 'application/json, text/plain, */*',
2024-05-01 12:36:42       'Content-Type': 'application/json; charset=UTF-8',
2024-05-01 12:36:42       'User-Agent': 'node-quickbase/v5.0.23 nodejs/v22.0.0',
2024-05-01 12:36:42       'QB-Realm-Hostname': 'foo.quickbase.com',
2024-05-01 12:36:42       Authorization: 'QB-USER-TOKEN <user_token>',
2024-05-01 12:36:42       'Content-Length': 5424723
2024-05-01 12:36:42     },
2024-05-01 12:36:42     method: 'post',
2024-05-01 12:36:42     baseURL: 'https://api.quickbase.com/v1',
2024-05-01 12:36:42     proxy: false,
2024-05-01 12:36:42     url: '/records',
2024-05-01 12:36:42     data: '{"to":"foobar123","data":[{"20":{"value":123},"10":{"value":{"data":"..."}}}]
2024-05-01 12:36:42   },
2024-05-01 12:36:42   request: <ref *1> ClientRequest {
2024-05-01 12:36:42     _events: [Object: null prototype] {
2024-05-01 12:36:42       abort: [Function (anonymous)],
2024-05-01 12:36:42       aborted: [Function (anonymous)],
2024-05-01 12:36:42       connect: [Function (anonymous)],
2024-05-01 12:36:42       error: [Function (anonymous)],
2024-05-01 12:36:42       socket: [Function (anonymous)],
2024-05-01 12:36:42       timeout: [Function (anonymous)],
2024-05-01 12:36:42       finish: [Function: requestOnFinish]
2024-05-01 12:36:42     },
2024-05-01 12:36:42     _eventsCount: 7,
2024-05-01 12:36:42     _maxListeners: undefined,
2024-05-01 12:36:42     outputData: [],
2024-05-01 12:36:42     outputSize: 0,
2024-05-01 12:36:42     writable: true,
2024-05-01 12:36:42     destroyed: true,
2024-05-01 12:36:42     _last: false,
2024-05-01 12:36:42     chunkedEncoding: false,
2024-05-01 12:36:42     shouldKeepAlive: true,
2024-05-01 12:36:42     maxRequestsOnConnectionReached: false,
2024-05-01 12:36:42     _defaultKeepAlive: true,
2024-05-01 12:36:42     useChunkedEncodingByDefault: true,
2024-05-01 12:36:42     sendDate: false,
2024-05-01 12:36:42     _removedConnection: false,
2024-05-01 12:36:42     _removedContLen: false,
2024-05-01 12:36:42     _removedTE: false,
2024-05-01 12:36:42     strictContentLength: false,
2024-05-01 12:36:42     _contentLength: 5424723,
2024-05-01 12:36:42     _hasBody: true,
2024-05-01 12:36:42     _trailer: '',
2024-05-01 12:36:42     finished: true,
2024-05-01 12:36:42     _headerSent: true,
2024-05-01 12:36:42     _closed: true,
2024-05-01 12:36:42     _header: 'POST /v1/records HTTP/1.1\r\n' +
2024-05-01 12:36:42       'Accept: application/json, text/plain, */*\r\n' +
2024-05-01 12:36:42       'Content-Type: application/json; charset=UTF-8\r\n' +
2024-05-01 12:36:42       'User-Agent: node-quickbase/v5.0.23 nodejs/v22.0.0\r\n' +
2024-05-01 12:36:42       'QB-Realm-Hostname: foo.quickbase.com\r\n' +
2024-05-01 12:36:42       'Authorization: QB-USER-TOKEN <user_token>\r\n' +
2024-05-01 12:36:42       'Content-Length: 5424723\r\n' +
2024-05-01 12:36:42       'Host: api.quickbase.com\r\n' +
2024-05-01 12:36:42       'Connection: keep-alive\r\n' +
2024-05-01 12:36:42       '\r\n',
2024-05-01 12:36:42     _keepAliveTimeout: 0,
2024-05-01 12:36:42     _onPendingData: [Function: nop],
2024-05-01 12:36:42     agent: Agent {
2024-05-01 12:36:42       _events: [Object: null prototype],
2024-05-01 12:36:42       _eventsCount: 2,
2024-05-01 12:36:42       _maxListeners: undefined,
2024-05-01 12:36:42       defaultPort: 443,
2024-05-01 12:36:42       protocol: 'https:',
2024-05-01 12:36:42       options: [Object: null prototype],
2024-05-01 12:36:42       requests: [Object: null prototype] {},
2024-05-01 12:36:42       sockets: [Object: null prototype] {},
2024-05-01 12:36:42       freeSockets: [Object: null prototype],
2024-05-01 12:36:42       keepAliveMsecs: 1000,
2024-05-01 12:36:42       keepAlive: true,
2024-05-01 12:36:42       maxSockets: Infinity,
2024-05-01 12:36:42       maxFreeSockets: 256,
2024-05-01 12:36:42       scheduling: 'lifo',
2024-05-01 12:36:42       maxTotalSockets: Infinity,
2024-05-01 12:36:42       totalSocketCount: 4,
2024-05-01 12:36:42       maxCachedSessions: 100,
2024-05-01 12:36:42       _sessionCache: [Object],
2024-05-01 12:36:42       [Symbol(shapeMode)]: false,
2024-05-01 12:36:42       [Symbol(kCapture)]: false
2024-05-01 12:36:42     },
2024-05-01 12:36:42     socketPath: undefined,
2024-05-01 12:36:42     method: 'POST',
2024-05-01 12:36:42     maxHeaderSize: undefined,
2024-05-01 12:36:42     insecureHTTPParser: undefined,
2024-05-01 12:36:42     joinDuplicateHeaders: undefined,
2024-05-01 12:36:42     path: '/v1/records',
2024-05-01 12:36:42     _ended: true,
2024-05-01 12:36:42     res: IncomingMessage {
2024-05-01 12:36:42       _events: [Object],
2024-05-01 12:36:42       _readableState: [ReadableState],
2024-05-01 12:36:42       _maxListeners: undefined,
2024-05-01 12:36:42       socket: null,
2024-05-01 12:36:42       httpVersionMajor: 1,
2024-05-01 12:36:42       httpVersionMinor: 1,
2024-05-01 12:36:42       httpVersion: '1.1',
2024-05-01 12:36:42       complete: true,
2024-05-01 12:36:42       rawHeaders: [Array],
2024-05-01 12:36:42       rawTrailers: [],
2024-05-01 12:36:42       joinDuplicateHeaders: undefined,
2024-05-01 12:36:42       aborted: false,
2024-05-01 12:36:42       upgrade: false,
2024-05-01 12:36:42       url: '',
2024-05-01 12:36:42       method: null,
2024-05-01 12:36:42       statusCode: 207,
2024-05-01 12:36:42       statusMessage: 'Multi-Status',
2024-05-01 12:36:42       client: [TLSSocket],
2024-05-01 12:36:42       _consuming: true,
2024-05-01 12:36:42       _dumped: false,
2024-05-01 12:36:42       req: [Circular *1],
2024-05-01 12:36:42       _eventsCount: 4,
2024-05-01 12:36:42       responseUrl: 'https://api.quickbase.com/v1/records',
2024-05-01 12:36:42       redirects: [],
2024-05-01 12:36:42       [Symbol(shapeMode)]: true,
2024-05-01 12:36:42       [Symbol(kCapture)]: false,
2024-05-01 12:36:42       [Symbol(kHeaders)]: [Object],
2024-05-01 12:36:42       [Symbol(kHeadersCount)]: 30,
2024-05-01 12:36:42       [Symbol(kTrailers)]: null,
2024-05-01 12:36:42       [Symbol(kTrailersCount)]: 0
2024-05-01 12:36:42     },
2024-05-01 12:36:42     aborted: false,
2024-05-01 12:36:42     timeoutCb: null,
2024-05-01 12:36:42     upgradeOrConnect: false,
2024-05-01 12:36:42     parser: null,
2024-05-01 12:36:42     maxHeadersCount: null,
2024-05-01 12:36:42     reusedSocket: true,
2024-05-01 12:36:42     host: 'api.quickbase.com',
2024-05-01 12:36:42     protocol: 'https:',
2024-05-01 12:36:42     _redirectable: Writable {
2024-05-01 12:36:42       _events: [Object],
2024-05-01 12:36:42       _writableState: [WritableState],
2024-05-01 12:36:42       _maxListeners: undefined,
2024-05-01 12:36:42       _options: [Object],
2024-05-01 12:36:42       _ended: true,
2024-05-01 12:36:42       _ending: true,
2024-05-01 12:36:42       _redirectCount: 0,
2024-05-01 12:36:42       _redirects: [],
2024-05-01 12:36:42       _requestBodyLength: 5424723,
2024-05-01 12:36:42       _requestBodyBuffers: [],
2024-05-01 12:36:42       _eventsCount: 3,
2024-05-01 12:36:42       _onNativeResponse: [Function (anonymous)],
2024-05-01 12:36:42       _currentRequest: [Circular *1],
2024-05-01 12:36:42       _currentUrl: 'https://api.quickbase.com/v1/records',
2024-05-01 12:36:42       [Symbol(shapeMode)]: true,
2024-05-01 12:36:42       [Symbol(kCapture)]: false
2024-05-01 12:36:42     },
2024-05-01 12:36:42     [Symbol(shapeMode)]: false,
2024-05-01 12:36:42     [Symbol(kCapture)]: false,
2024-05-01 12:36:42     [Symbol(kBytesWritten)]: 0,
2024-05-01 12:36:42     [Symbol(kNeedDrain)]: false,
2024-05-01 12:36:42     [Symbol(corked)]: 0,
2024-05-01 12:36:42     [Symbol(kChunkedBuffer)]: [],
2024-05-01 12:36:42     [Symbol(kChunkedLength)]: 0,
2024-05-01 12:36:42     [Symbol(kSocket)]: TLSSocket {
2024-05-01 12:36:42       _tlsOptions: [Object],
2024-05-01 12:36:42       _secureEstablished: true,
2024-05-01 12:36:42       _securePending: false,
2024-05-01 12:36:42       _newSessionPending: false,
2024-05-01 12:36:42       _controlReleased: true,
2024-05-01 12:36:42       secureConnecting: false,
2024-05-01 12:36:42       _SNICallback: null,
2024-05-01 12:36:42       servername: 'api.quickbase.com',
2024-05-01 12:36:42       alpnProtocol: false,
2024-05-01 12:36:42       authorized: true,
2024-05-01 12:36:42       authorizationError: null,
2024-05-01 12:36:42       encrypted: true,
2024-05-01 12:36:42       _events: [Object: null prototype],
2024-05-01 12:36:42       _eventsCount: 9,
2024-05-01 12:36:42       connecting: false,
2024-05-01 12:36:42       _hadError: false,
2024-05-01 12:36:42       _parent: null,
2024-05-01 12:36:42       _host: 'api.quickbase.com',
2024-05-01 12:36:42       _closeAfterHandlingError: false,
2024-05-01 12:36:42       _readableState: [ReadableState],
2024-05-01 12:36:42       _writableState: [WritableState],
2024-05-01 12:36:42       allowHalfOpen: false,
2024-05-01 12:36:42       _maxListeners: undefined,
2024-05-01 12:36:42       _sockname: null,
2024-05-01 12:36:42       _pendingData: null,
2024-05-01 12:36:42       _pendingEncoding: '',
2024-05-01 12:36:42       server: undefined,
2024-05-01 12:36:42       _server: null,
2024-05-01 12:36:42       ssl: [TLSWrap],
2024-05-01 12:36:42       _requestCert: true,
2024-05-01 12:36:42       _rejectUnauthorized: true,
2024-05-01 12:36:42       timeout: 5000,
2024-05-01 12:36:42       parser: null,
2024-05-01 12:36:42       _httpMessage: null,
2024-05-01 12:36:42       autoSelectFamilyAttemptedAddresses: [Array],
2024-05-01 12:36:42       [Symbol(alpncallback)]: null,
2024-05-01 12:36:42       [Symbol(res)]: [TLSWrap],
2024-05-01 12:36:42       [Symbol(verified)]: true,
2024-05-01 12:36:42       [Symbol(pendingSession)]: null,
2024-05-01 12:36:42       [Symbol(async_id_symbol)]: -1,
2024-05-01 12:36:42       [Symbol(kHandle)]: [TLSWrap],
2024-05-01 12:36:42       [Symbol(lastWriteQueueSize)]: 0,
2024-05-01 12:36:42       [Symbol(timeout)]: Timeout {
2024-05-01 12:36:42         _idleTimeout: 5000,
2024-05-01 12:36:42         _idlePrev: [TimersList],
2024-05-01 12:36:42         _idleNext: [Timeout],
2024-05-01 12:36:42         _idleStart: 417355,
2024-05-01 12:36:42         _onTimeout: [Function: bound ],
2024-05-01 12:36:42         _timerArgs: undefined,
2024-05-01 12:36:42         _repeat: null,
2024-05-01 12:36:42         _destroyed: false,
2024-05-01 12:36:42         [Symbol(refed)]: false,
2024-05-01 12:36:42         [Symbol(kHasPrimitive)]: false,
2024-05-01 12:36:42         [Symbol(asyncId)]: 64044,
2024-05-01 12:36:42         [Symbol(triggerId)]: 64042
2024-05-01 12:36:42       },
2024-05-01 12:36:42       [Symbol(kBuffer)]: null,
2024-05-01 12:36:42       [Symbol(kBufferCb)]: null,
2024-05-01 12:36:42       [Symbol(kBufferGen)]: null,
2024-05-01 12:36:42       [Symbol(shapeMode)]: true,
2024-05-01 12:36:42       [Symbol(kCapture)]: false,
2024-05-01 12:36:42       [Symbol(kSetNoDelay)]: false,
2024-05-01 12:36:42       [Symbol(kSetKeepAlive)]: true,
2024-05-01 12:36:42       [Symbol(kSetKeepAliveInitialDelay)]: 1,
2024-05-01 12:36:42       [Symbol(kBytesRead)]: 0,
2024-05-01 12:36:42       [Symbol(kBytesWritten)]: 0,
2024-05-01 12:36:42       [Symbol(connect-options)]: [Object]
2024-05-01 12:36:42     },
2024-05-01 12:36:42     [Symbol(kOutHeaders)]: [Object: null prototype] {
2024-05-01 12:36:42       accept: [Array],
2024-05-01 12:36:42       'content-type': [Array],
2024-05-01 12:36:42       'user-agent': [Array],
2024-05-01 12:36:42       'qb-realm-hostname': [Array],
2024-05-01 12:36:42       authorization: [Array],
2024-05-01 12:36:42       'content-length': [Array],
2024-05-01 12:36:42       host: [Array]
2024-05-01 12:36:42     },
2024-05-01 12:36:42     [Symbol(errored)]: null,
2024-05-01 12:36:42     [Symbol(kHighWaterMark)]: 65536,
2024-05-01 12:36:42     [Symbol(kRejectNonStandardBodyWrites)]: false,
2024-05-01 12:36:42     [Symbol(kUniqueHeaders)]: null
2024-05-01 12:36:42   },
2024-05-01 12:36:42   data: {
2024-05-01 12:36:42     data: [],
2024-05-01 12:36:42     metadata: {
2024-05-01 12:36:42       createdRecordIds: [],
2024-05-01 12:36:42       lineErrors: [Object],
2024-05-01 12:36:42       totalNumberOfRecordsProcessed: 1,
2024-05-01 12:36:42       unchangedRecordIds: [],
2024-05-01 12:36:42       updatedRecordIds: []
2024-05-01 12:36:42     }
2024-05-01 12:36:42   }
2024-05-01 12:36:42 } +2s

from node-quickbase.

tflanagan avatar tflanagan commented on August 26, 2024

Hey @7elephants , that looks like the response only, not the request, but we at least see there is a lineError.

If you are able to print out that lineErrors property from the response, we may gain some insight.

For a full picture, can you also include the request object too? (scrub it of any sensitive info, user token, dbids, etc)

from node-quickbase.

7elephants avatar 7elephants commented on August 26, 2024

Sorry about that @tflanagan. Here is the full request/response

2024-05-01 12:36:35 quickbase:request 1070 {
2024-05-01 12:36:35   method: 'POST',
2024-05-01 12:36:35   baseURL: 'https://api.quickbase.com/v1',
2024-05-01 12:36:35   headers: {
2024-05-01 12:36:35     'Content-Type': 'application/json; charset=UTF-8',
2024-05-01 12:36:35     'User-Agent': 'node-quickbase/v5.0.23 nodejs/v22.0.0',
2024-05-01 12:36:35     'QB-Realm-Hostname': 'foo.quickbase.com'
2024-05-01 12:36:35   },
2024-05-01 12:36:35   proxy: false,
2024-05-01 12:36:35   url: '/records',
2024-05-01 12:36:35   data: { to: 'table', data: [ [Object] ] }
2024-05-01 12:36:35 } +581ms
2024-05-01 12:36:36   quickbase:response 1065 {
2024-05-01 12:36:36   status: 207,
2024-05-01 12:36:36   statusText: 'Multi-Status',
2024-05-01 12:36:36   headers: {
2024-05-01 12:36:36     date: 'Wed, 01 May 2024 16:36:36 GMT',
2024-05-01 12:36:36     'content-type': 'application/json; charset=utf-8',
2024-05-01 12:36:36     'transfer-encoding': 'chunked',
2024-05-01 12:36:36     connection: 'keep-alive',
2024-05-01 12:36:36     'qb-api-ray': 'b59466af-a055-479d-8b20-0aec3d3d4da9',
2024-05-01 12:36:36     'access-control-allow-origin': '*',
2024-05-01 12:36:36     'access-control-expose-headers': 'qb-api-ray,x-ratelimit-remaining,x-ratelimit-limit,x-ratelimit-reset,content-disposition,retry-after',
2024-05-01 12:36:36     'x-content-type-options': 'nosniff',
2024-05-01 12:36:36     'x-frame-options': 'SAMEORIGIN',
2024-05-01 12:36:36     'strict-transport-security': 'max-age=31536000; includeSubDomains',
2024-05-01 12:36:36     vary: 'Accept-Encoding',
2024-05-01 12:36:36     'cf-cache-status': 'DYNAMIC',
2024-05-01 12:36:36     'content-security-policy': "default-src * 'unsafe-eval' 'unsafe-inline' data: filesystem: about: blob: ws: wss:",
2024-05-01 12:36:36     server: 'cloudflare',
2024-05-01 12:36:36     'cf-ray': '87d130f7dcd90c95-EWR'
2024-05-01 12:36:36   },
2024-05-01 12:36:36   config: {
2024-05-01 12:36:36     transitional: {
2024-05-01 12:36:36       silentJSONParsing: true,
2024-05-01 12:36:36       forcedJSONParsing: true,
2024-05-01 12:36:36       clarifyTimeoutError: false
2024-05-01 12:36:36     },
2024-05-01 12:36:36     adapter: [Function: httpAdapter],
2024-05-01 12:36:36     transformRequest: [ [Function: transformRequest] ],
2024-05-01 12:36:36     transformResponse: [ [Function: transformResponse] ],
2024-05-01 12:36:36     timeout: 0,
2024-05-01 12:36:36     xsrfCookieName: 'XSRF-TOKEN',
2024-05-01 12:36:36     xsrfHeaderName: 'X-XSRF-TOKEN',
2024-05-01 12:36:36     maxContentLength: -1,
2024-05-01 12:36:36     maxBodyLength: -1,
2024-05-01 12:36:36     env: { FormData: [Function] },
2024-05-01 12:36:36     validateStatus: [Function: validateStatus],
2024-05-01 12:36:36     headers: {
2024-05-01 12:36:36       Accept: 'application/json, text/plain, */*',
2024-05-01 12:36:36       'Content-Type': 'application/json; charset=UTF-8',
2024-05-01 12:36:36       'User-Agent': 'node-quickbase/v5.0.23 nodejs/v22.0.0',
2024-05-01 12:36:36       'QB-Realm-Hostname': 'foo.quickbase.com',
2024-05-01 12:36:36       Authorization: 'QB-USER-TOKEN <token>',
2024-05-01 12:36:36       'Content-Length': 508955
2024-05-01 12:36:36     },
2024-05-01 12:36:36     method: 'post',
2024-05-01 12:36:36     baseURL: 'https://api.quickbase.com/v1',
2024-05-01 12:36:36     proxy: false,
2024-05-01 12:36:36     url: '/records',
2024-05-01 12:36:36     data: '{"to":"table","data":[{"10": {"value": {"filename":"test.pptx","data":<Base64 file>}},"20": {"value": 584}}],
2024-05-01 12:36:36   request: <ref *1> ClientRequest {
2024-05-01 12:36:36     _events: [Object: null prototype] {
2024-05-01 12:36:36       abort: [Function (anonymous)],
2024-05-01 12:36:36       aborted: [Function (anonymous)],
2024-05-01 12:36:36       connect: [Function (anonymous)],
2024-05-01 12:36:36       error: [Function (anonymous)],
2024-05-01 12:36:36       socket: [Function (anonymous)],
2024-05-01 12:36:36       timeout: [Function (anonymous)],
2024-05-01 12:36:36       finish: [Function: requestOnFinish]
2024-05-01 12:36:36     },
2024-05-01 12:36:36     _eventsCount: 7,
2024-05-01 12:36:36     _maxListeners: undefined,
2024-05-01 12:36:36     outputData: [],
2024-05-01 12:36:36     outputSize: 0,
2024-05-01 12:36:36     writable: true,
2024-05-01 12:36:36     destroyed: true,
2024-05-01 12:36:36     _last: false,
2024-05-01 12:36:36     chunkedEncoding: false,
2024-05-01 12:36:36     shouldKeepAlive: true,
2024-05-01 12:36:36     maxRequestsOnConnectionReached: false,
2024-05-01 12:36:36     _defaultKeepAlive: true,
2024-05-01 12:36:36     useChunkedEncodingByDefault: true,
2024-05-01 12:36:36     sendDate: false,
2024-05-01 12:36:36     _removedConnection: false,
2024-05-01 12:36:36     _removedContLen: false,
2024-05-01 12:36:36     _removedTE: false,
2024-05-01 12:36:36     strictContentLength: false,
2024-05-01 12:36:36     _contentLength: 508955,
2024-05-01 12:36:36     _hasBody: true,
2024-05-01 12:36:36     _trailer: '',
2024-05-01 12:36:36     finished: true,
2024-05-01 12:36:36     _headerSent: true,
2024-05-01 12:36:36     _closed: true,
2024-05-01 12:36:36     _header: 'POST /v1/records HTTP/1.1\r\n' +
2024-05-01 12:36:36       'Accept: application/json, text/plain, */*\r\n' +
2024-05-01 12:36:36       'Content-Type: application/json; charset=UTF-8\r\n' +
2024-05-01 12:36:36       'User-Agent: node-quickbase/v5.0.23 nodejs/v22.0.0\r\n' +
2024-05-01 12:36:36       'QB-Realm-Hostname: foo.quickbase.com\r\n' +
2024-05-01 12:36:36       'Authorization: QB-USER-TOKEN <token>\r\n' +
2024-05-01 12:36:36       'Content-Length: 508955\r\n' +
2024-05-01 12:36:36       'Host: api.quickbase.com\r\n' +
2024-05-01 12:36:36       'Connection: keep-alive\r\n' +
2024-05-01 12:36:36       '\r\n',
2024-05-01 12:36:36     _keepAliveTimeout: 0,
2024-05-01 12:36:36     _onPendingData: [Function: nop],
2024-05-01 12:36:36     agent: Agent {
2024-05-01 12:36:36       _events: [Object: null prototype],
2024-05-01 12:36:36       _eventsCount: 2,
2024-05-01 12:36:36       _maxListeners: undefined,
2024-05-01 12:36:36       defaultPort: 443,
2024-05-01 12:36:36       protocol: 'https:',
2024-05-01 12:36:36       options: [Object: null prototype],
2024-05-01 12:36:36       requests: [Object: null prototype] {},
2024-05-01 12:36:36       sockets: [Object: null prototype],
2024-05-01 12:36:36       freeSockets: [Object: null prototype],
2024-05-01 12:36:36       keepAliveMsecs: 1000,
2024-05-01 12:36:36       keepAlive: true,
2024-05-01 12:36:36       maxSockets: Infinity,
2024-05-01 12:36:36       maxFreeSockets: 256,
2024-05-01 12:36:36       scheduling: 'lifo',
2024-05-01 12:36:36       maxTotalSockets: Infinity,
2024-05-01 12:36:36       totalSocketCount: 11,
2024-05-01 12:36:36       maxCachedSessions: 100,
2024-05-01 12:36:36       _sessionCache: [Object],
2024-05-01 12:36:36       [Symbol(shapeMode)]: false,
2024-05-01 12:36:36       [Symbol(kCapture)]: false
2024-05-01 12:36:36     },
2024-05-01 12:36:36     socketPath: undefined,
2024-05-01 12:36:36     method: 'POST',
2024-05-01 12:36:36     maxHeaderSize: undefined,
2024-05-01 12:36:36     insecureHTTPParser: undefined,
2024-05-01 12:36:36     joinDuplicateHeaders: undefined,
2024-05-01 12:36:36     path: '/v1/records',
2024-05-01 12:36:36     _ended: true,
2024-05-01 12:36:36     res: IncomingMessage {
2024-05-01 12:36:36       _events: [Object],
2024-05-01 12:36:36       _readableState: [ReadableState],
2024-05-01 12:36:36       _maxListeners: undefined,
2024-05-01 12:36:36       socket: null,
2024-05-01 12:36:36       httpVersionMajor: 1,
2024-05-01 12:36:36       httpVersionMinor: 1,
2024-05-01 12:36:36       httpVersion: '1.1',
2024-05-01 12:36:36       complete: true,
2024-05-01 12:36:36       rawHeaders: [Array],
2024-05-01 12:36:36       rawTrailers: [],
2024-05-01 12:36:36       joinDuplicateHeaders: undefined,
2024-05-01 12:36:36       aborted: false,
2024-05-01 12:36:36       upgrade: false,
2024-05-01 12:36:36       url: '',
2024-05-01 12:36:36       method: null,
2024-05-01 12:36:36       statusCode: 207,
2024-05-01 12:36:36       statusMessage: 'Multi-Status',
2024-05-01 12:36:36       client: [TLSSocket],
2024-05-01 12:36:36       _consuming: true,
2024-05-01 12:36:36       _dumped: false,
2024-05-01 12:36:36       req: [Circular *1],
2024-05-01 12:36:36       _eventsCount: 4,
2024-05-01 12:36:36       responseUrl: 'https://api.quickbase.com/v1/records',
2024-05-01 12:36:36       redirects: [],
2024-05-01 12:36:36       [Symbol(shapeMode)]: true,
2024-05-01 12:36:36       [Symbol(kCapture)]: false,
2024-05-01 12:36:36       [Symbol(kHeaders)]: [Object],
2024-05-01 12:36:36       [Symbol(kHeadersCount)]: 30,
2024-05-01 12:36:36       [Symbol(kTrailers)]: null,
2024-05-01 12:36:36       [Symbol(kTrailersCount)]: 0
2024-05-01 12:36:36     },
2024-05-01 12:36:36     aborted: false,
2024-05-01 12:36:36     timeoutCb: null,
2024-05-01 12:36:36     upgradeOrConnect: false,
2024-05-01 12:36:36     parser: null,
2024-05-01 12:36:36     maxHeadersCount: null,
2024-05-01 12:36:36     reusedSocket: true,
2024-05-01 12:36:36     host: 'api.quickbase.com',
2024-05-01 12:36:36     protocol: 'https:',
2024-05-01 12:36:36     _redirectable: Writable {
2024-05-01 12:36:36       _events: [Object],
2024-05-01 12:36:36       _writableState: [WritableState],
2024-05-01 12:36:36       _maxListeners: undefined,
2024-05-01 12:36:36       _options: [Object],
2024-05-01 12:36:36       _ended: true,
2024-05-01 12:36:36       _ending: true,
2024-05-01 12:36:36       _redirectCount: 0,
2024-05-01 12:36:36       _redirects: [],
2024-05-01 12:36:36       _requestBodyLength: 508955,
2024-05-01 12:36:36       _requestBodyBuffers: [],
2024-05-01 12:36:36       _eventsCount: 3,
2024-05-01 12:36:36       _onNativeResponse: [Function (anonymous)],
2024-05-01 12:36:36       _currentRequest: [Circular *1],
2024-05-01 12:36:36       _currentUrl: 'https://api.quickbase.com/v1/records',
2024-05-01 12:36:36       [Symbol(shapeMode)]: true,
2024-05-01 12:36:36       [Symbol(kCapture)]: false
2024-05-01 12:36:36     },
2024-05-01 12:36:36     [Symbol(shapeMode)]: false,
2024-05-01 12:36:36     [Symbol(kCapture)]: false,
2024-05-01 12:36:36     [Symbol(kBytesWritten)]: 0,
2024-05-01 12:36:36     [Symbol(kNeedDrain)]: false,
2024-05-01 12:36:36     [Symbol(corked)]: 0,
2024-05-01 12:36:36     [Symbol(kChunkedBuffer)]: [],
2024-05-01 12:36:36     [Symbol(kChunkedLength)]: 0,
2024-05-01 12:36:36     [Symbol(kSocket)]: TLSSocket {
2024-05-01 12:36:36       _tlsOptions: [Object],
2024-05-01 12:36:36       _secureEstablished: true,
2024-05-01 12:36:36       _securePending: false,
2024-05-01 12:36:36       _newSessionPending: false,
2024-05-01 12:36:36       _controlReleased: true,
2024-05-01 12:36:36       secureConnecting: false,
2024-05-01 12:36:36       _SNICallback: null,
2024-05-01 12:36:36       servername: 'api.quickbase.com',
2024-05-01 12:36:36       alpnProtocol: false,
2024-05-01 12:36:36       authorized: true,
2024-05-01 12:36:36       authorizationError: null,
2024-05-01 12:36:36       encrypted: true,
2024-05-01 12:36:36       _events: [Object: null prototype],
2024-05-01 12:36:36       _eventsCount: 9,
2024-05-01 12:36:36       connecting: false,
2024-05-01 12:36:36       _hadError: false,
2024-05-01 12:36:36       _parent: null,
2024-05-01 12:36:36       _host: 'api.quickbase.com',
2024-05-01 12:36:36       _closeAfterHandlingError: false,
2024-05-01 12:36:36       _readableState: [ReadableState],
2024-05-01 12:36:36       _writableState: [WritableState],
2024-05-01 12:36:36       allowHalfOpen: false,
2024-05-01 12:36:36       _maxListeners: undefined,
2024-05-01 12:36:36       _sockname: null,
2024-05-01 12:36:36       _pendingData: null,
2024-05-01 12:36:36       _pendingEncoding: '',
2024-05-01 12:36:36       server: undefined,
2024-05-01 12:36:36       _server: null,
2024-05-01 12:36:36       ssl: [TLSWrap],
2024-05-01 12:36:36       _requestCert: true,
2024-05-01 12:36:36       _rejectUnauthorized: true,
2024-05-01 12:36:36       timeout: 5000,
2024-05-01 12:36:36       parser: null,
2024-05-01 12:36:36       _httpMessage: null,
2024-05-01 12:36:36       autoSelectFamilyAttemptedAddresses: [Array],
2024-05-01 12:36:36       [Symbol(alpncallback)]: null,
2024-05-01 12:36:36       [Symbol(res)]: [TLSWrap],
2024-05-01 12:36:36       [Symbol(verified)]: true,
2024-05-01 12:36:36       [Symbol(pendingSession)]: null,
2024-05-01 12:36:36       [Symbol(async_id_symbol)]: -1,
2024-05-01 12:36:36       [Symbol(kHandle)]: [TLSWrap],
2024-05-01 12:36:36       [Symbol(lastWriteQueueSize)]: 0,
2024-05-01 12:36:36       [Symbol(timeout)]: Timeout {
2024-05-01 12:36:36         _idleTimeout: 5000,
2024-05-01 12:36:36         _idlePrev: [TimersList],
2024-05-01 12:36:36         _idleNext: [Timeout],
2024-05-01 12:36:36         _idleStart: 410825,
2024-05-01 12:36:36         _onTimeout: [Function: bound ],
2024-05-01 12:36:36         _timerArgs: undefined,
2024-05-01 12:36:36         _repeat: null,
2024-05-01 12:36:36         _destroyed: false,
2024-05-01 12:36:36         [Symbol(refed)]: false,
2024-05-01 12:36:36         [Symbol(kHasPrimitive)]: false,
2024-05-01 12:36:36         [Symbol(asyncId)]: 63939,
2024-05-01 12:36:36         [Symbol(triggerId)]: 63937
2024-05-01 12:36:36       },
2024-05-01 12:36:36       [Symbol(kBuffer)]: null,
2024-05-01 12:36:36       [Symbol(kBufferCb)]: null,
2024-05-01 12:36:36       [Symbol(kBufferGen)]: null,
2024-05-01 12:36:36       [Symbol(shapeMode)]: true,
2024-05-01 12:36:36       [Symbol(kCapture)]: false,
2024-05-01 12:36:36       [Symbol(kSetNoDelay)]: false,
2024-05-01 12:36:36       [Symbol(kSetKeepAlive)]: true,
2024-05-01 12:36:36       [Symbol(kSetKeepAliveInitialDelay)]: 1,
2024-05-01 12:36:36       [Symbol(kBytesRead)]: 0,
2024-05-01 12:36:36       [Symbol(kBytesWritten)]: 0,
2024-05-01 12:36:36       [Symbol(connect-options)]: [Object]
2024-05-01 12:36:36     },
2024-05-01 12:36:36     [Symbol(kOutHeaders)]: [Object: null prototype] {
2024-05-01 12:36:36       accept: [Array],
2024-05-01 12:36:36       'content-type': [Array],
2024-05-01 12:36:36       'user-agent': [Array],
2024-05-01 12:36:36       'qb-realm-hostname': [Array],
2024-05-01 12:36:36       authorization: [Array],
2024-05-01 12:36:36       'content-length': [Array],
2024-05-01 12:36:36       host: [Array]
2024-05-01 12:36:36     },
2024-05-01 12:36:36     [Symbol(errored)]: null,
2024-05-01 12:36:36     [Symbol(kHighWaterMark)]: 65536,
2024-05-01 12:36:36     [Symbol(kRejectNonStandardBodyWrites)]: false,
2024-05-01 12:36:36     [Symbol(kUniqueHeaders)]: null
2024-05-01 12:36:36   },
2024-05-01 12:36:36   data: {
2024-05-01 12:36:36     data: [],
2024-05-01 12:36:36     metadata: {
2024-05-01 12:36:36       createdRecordIds: [],
2024-05-01 12:36:36       lineErrors: [Object],
2024-05-01 12:36:36       totalNumberOfRecordsProcessed: 1,
2024-05-01 12:36:36       unchangedRecordIds: [],
2024-05-01 12:36:36       updatedRecordIds: []
2024-05-01 12:36:36     }
2024-05-01 12:36:36   }
2024-05-01 12:36:36 } +21ms

And here is an example of the line error

{"1":["Missing value for required field with ID \"10\"."]}

Not sure why it thinks the file field thinks the data is missing

from node-quickbase.

tflanagan avatar tflanagan commented on August 26, 2024

Hey @7elephants,

Yea, I agree with you, from what we can see in these debug statements it should be working fine.

I would open a support ticket with Quickbase, you may have found a bug in their platform. The file upload test we have in this repo is working as expected and in the same manner you are using it (minus the required flag).

With every API request, Quickbase will return a qb-api-ray id that helps them identify things internally. In your support ticket, I would add the qb-api-ray id you receive. In the statement you pasted above, it is b59466af-a055-479d-8b20-0aec3d3d4da9.

I'd be very curious as to what they say if you don't mind reporting back.

from node-quickbase.

7elephants avatar 7elephants commented on August 26, 2024

Certainly will @tflanagan. Anecdotally, using Postman, with the same source data it does work in accepting the file.

from node-quickbase.

7elephants avatar 7elephants commented on August 26, 2024

So @tflanagan, it was an issue with how I was forming the request (a.k.a. it was malformed), but that was very hard to see with what I was getting out of DEBUG.

You may want consider using https://www.npmjs.com/package/debug-next instead of debug (seems like this package is abandoned).

Thanks for all the follow up...

from node-quickbase.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.