Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions app/lib/task/backend.dart
Original file line number Diff line number Diff line change
Expand Up @@ -610,7 +610,9 @@ class TaskBackend {

final state = await _db.tasks.lookupOrNull(package);
if (state == null) {
throw NotFoundException.resource('$package/$version');
throw NotFoundException.resource(
'PackageState($runtimeVersion/$package)',
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't you want to also include the version here?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The lookup above depends only on the runtimeVersion and the package name, the version check comes only later. I think removing the version from the message makes it better focused on the operation.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fair

);
}
final versionState = _authorizeWorkerCallback(
package,
Expand Down Expand Up @@ -686,7 +688,9 @@ class TaskBackend {
await withRetryTransaction(_db, (tx) async {
final state = await tx.tasks.lookupOrNull(package);
if (state == null) {
throw NotFoundException.resource('$package/$version');
throw NotFoundException.resource(
'PackageState($runtimeVersion/$package)',
);
}
final versionState = _authorizeWorkerCallback(
package,
Expand Down