File attachment using Node SDK

Zdangelo
Zdangelo
edited 10/10/24 in API & Developers

Hello, I am trying to add a new row and then attach a file to it using the smartsheet Node.js SDK.

The first part of this is no problem, I can add a row using the SDK without issue.

The problem is with uploading files, the post request from the smartsheet client takes a while to resolve and eventually I get the following error:

[Smartsheet] 2024-10-10T18:10:42.189Z[ ERROR] Response: Failure (HTTP NaN)
Error Code: NaN - Cannot read properties of undefined (reading 'status')
Ref ID: undefined

Any ideas what could cause this or how I could fix it?

Answers

  • SSFeatures
    SSFeatures ✭✭✭✭✭

    Hi @Zdangelo,

    Can you post the relevant code that you're using to upload the file? I would check the MIME type, and also make sure that you're spitting out all of the errors, even from any promise chaining.

    You're not the only one who has seen this error, I also found this thread:

    Nathan Braun (Founder of SSFeatures) (nathan@ssfeatures.com)

    SSFeatures - The browser extension that adds more features into SmartSheet.

    • Report PDF generator that supports grouped and summarized reports
    • Automatic sorting, sorting with filters, saving sort settings
    • Hiding and unhiding columns, and spell checking