Skip to content

Invalid time parsing throws error #210

@beauraines

Description

@beauraines

When an improperly formatted time string is passed to the command, it barfs. This should make a nice error message and handle the exception.

toggl edit --start 8;29AM

TypeError: startTime.toISOString is not a function
    at Object.handler (file:///opt/homebrew/lib/node_modules/@beauraines/toggl-cli/cmds/edit.mjs:62:40)
    at process.processTicksAndRejections (node:internal/process/task_queues:105:5)
-bash: 29AM: command not found

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions