Skip to content

[Bug]: /logs/poll fails with 500 if passing a bad next_token #2895

@r4victor

Description

@r4victor

Steps to reproduce

Pass an invalid next_token to /api/project/main/logs/poll with file logs enabled:

{
	"run_name": "aaa",
	"job_submission_id": "dd39819f-fc4b-431d-9d8a-03b690806fd7",
	"next_token": -1
}

The server will return 500 and print and exception:

dstack._internal.server.services.logs.base.LogStorageError: Invalid next_token: -1. Must be a non-negative integer.

Actual behaviour

No response

Expected behaviour

No response

dstack version

master

Server logs

Additional information

No response

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions