Skip to content
This repository was archived by the owner on Aug 1, 2024. It is now read-only.
This repository was archived by the owner on Aug 1, 2024. It is now read-only.

timeEntriesIdDelete throws error on success #11

@sgtoj

Description

@sgtoj

TimeEntriesApi.timeEntriesPost() throws error on success. ConnectWise doesn't return data on DELETE methods. However, it seems some sort of JSON parsing of the body/data is being performed before returning to the requester. You should check for 204 status fore attempting to parse.

Error Message and Stack

FetchError: invalid json response body at https://empire.sw.com/v4_6_release/apis/3.0/time/entries/11316363? reason: Unexpected end of JSON input
    at c:\Users\skywaker\dealth-star-api\node_modules\node-fetch\lib\body.js:48:31
    at <anonymous>
    at process._tickDomainCallback (internal/process/next_tick.js:228:7)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions