Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exception whilst adding relative reminder to newly created item #24

Closed
KoertLichtendonk opened this issue Apr 1, 2023 · 1 comment · Fixed by #25
Closed

Exception whilst adding relative reminder to newly created item #24

KoertLichtendonk opened this issue Apr 1, 2023 · 1 comment · Fixed by #25
Assignees
Labels

Comments

@KoertLichtendonk
Copy link

Hello, I'm getting an exception whilst adding a relative reminder to a newly created item. I can't seem to figure out what I'm doing wrong here. Any help would be appreciated.

The item is created and DueDate is correctly set, I also await the item creation. The exception is on the manager.Reminders.AddAsync async line.

Exception

System.AggregateException
  HResult=0x80131500
  Message=One or more errors occurred. (Invalid argument value)
  Source=Todoist.Net
  StackTrace:
   at Todoist.Net.TodoistClient.ThrowIfErrors(SyncResponse syncResponse)
   at Todoist.Net.TodoistClient.<Todoist-Net-IAdvancedTodoistClient-ExecuteCommandsAsync>d__55.MoveNext()
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Todoist.Net.Services.CommandServiceBase.<ExecuteCommandAsync>d__8.MoveNext()
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Todoist.Net.Services.RemindersCommandService.<AddAsync>d__2.MoveNext()
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at Program.<<Main>$>d__0.MoveNext() in C:\Users\KLich\Source\Repos\KoertLichtendonk\TraktCalendarToTodoist\TraktCalendarToTodoist\Program.cs:line 42

Inner Exception 1:
TodoistException: Invalid argument value

My code

        Item calendarItem = new Item(show.Title)
        {
            DueDate = new DueDate(show.PublishDate.DateTime, false, _config.timezone)
        };

        ComplexId task = await todoistFactory.CreateTask(manager, calendarItem);

        if(!task.IsEmpty)
        {
            await manager.Reminders.AddAsync(new Reminder(task) { Type = ReminderType.Relative, MinuteOffset = 60 });
        }
olsh added a commit that referenced this issue Apr 2, 2023
@olsh olsh self-assigned this Apr 2, 2023
@olsh olsh added the bug label Apr 2, 2023
@olsh olsh closed this as completed in #25 Apr 2, 2023
olsh added a commit that referenced this issue Apr 2, 2023
@olsh
Copy link
Owner

olsh commented Apr 2, 2023

This will be fixed in the next release.

Thank you! 👍🏻

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants