This is an automated email from the ASF dual-hosted git repository.

akm pushed a commit to branch storage-interface-error-messages-redux
in repository https://gitbox.apache.org/repos/asf/tooling-trusted-releases.git

commit c945e89e2dce61e168d6decc6eff5d5ddf5b1272
Author: Dave Fisher <[email protected]>
AuthorDate: Wed Jan 21 17:05:41 2026 -0800

    Update storage interface error messages
---
 atr/storage/__init__.py               | 28 +++++++++++++---------------
 atr/storage/readers/checks.py         |  4 ++--
 atr/storage/readers/releases.py       |  2 +-
 atr/storage/readers/tokens.py         |  4 ++--
 atr/storage/writers/announce.py       |  8 ++++----
 atr/storage/writers/cache.py          |  6 +++---
 atr/storage/writers/checks.py         |  6 +++---
 atr/storage/writers/distributions.py  |  6 +++---
 atr/storage/writers/keys.py           | 10 +++++-----
 atr/storage/writers/policy.py         |  6 +++---
 atr/storage/writers/project.py        |  6 +++---
 atr/storage/writers/release.py        |  8 ++++----
 atr/storage/writers/revision.py       |  6 +++---
 atr/storage/writers/sbom.py           |  6 +++---
 atr/storage/writers/ssh.py            |  6 +++---
 atr/storage/writers/tokens.py         |  6 +++---
 atr/storage/writers/vote.py           | 12 ++++++------
 atr/storage/writers/workflowstatus.py |  6 +++---
 18 files changed, 67 insertions(+), 69 deletions(-)

diff --git a/atr/storage/__init__.py b/atr/storage/__init__.py
index 49dc769..6115791 100644
--- a/atr/storage/__init__.py
+++ b/atr/storage/__init__.py
@@ -171,7 +171,7 @@ class WriteAsFoundationCommitter(WriteAsGeneralPublic):
     @property
     def asf_uid(self) -> str:
         if self.__asf_uid is None:
-            raise AccessError("No ASF UID")
+            raise AccessError("Not authorized")
         return self.__asf_uid
 
 
@@ -196,7 +196,7 @@ class 
WriteAsCommitteeParticipant(WriteAsFoundationCommitter):
     @property
     def asf_uid(self) -> str:
         if self.__asf_uid is None:
-            raise AccessError("No ASF UID")
+            raise AccessError("No authorized")
         return self.__asf_uid
 
     @property
@@ -227,7 +227,7 @@ class WriteAsCommitteeMember(WriteAsCommitteeParticipant):
     @property
     def asf_uid(self) -> str:
         if self.__asf_uid is None:
-            raise AccessError("No ASF UID")
+            raise AccessError("Not authorized")
         return self.__asf_uid
 
     @property
@@ -245,7 +245,7 @@ class WriteAsFoundationAdmin(WriteAsCommitteeMember):
     @property
     def asf_uid(self) -> str:
         if self.__asf_uid is None:
-            raise AccessError("No ASF UID")
+            raise AccessError("Not authorized")
         return self.__asf_uid
 
     @property
@@ -270,11 +270,9 @@ class Write:
 
     def as_committee_member_outcome(self, committee_name: str) -> 
outcome.Outcome[WriteAsCommitteeMember]:
         if self.__authorisation.asf_uid is None:
-            return outcome.Error(AccessError("No ASF UID"))
+            return outcome.Error(AccessError("Not authorized"))
         if not self.__authorisation.is_member_of(committee_name):
-            return outcome.Error(
-                AccessError(f"ASF UID {self.__authorisation.asf_uid} is not a 
member of {committee_name}")
-            )
+            return outcome.Error(AccessError(f"{self.__authorisation.asf_uid} 
is not a member of {committee_name}"))
         try:
             wacm = WriteAsCommitteeMember(self, self.__data, committee_name)
         except Exception as e:
@@ -286,7 +284,7 @@ class Write:
 
     def as_committee_participant_outcome(self, committee_name: str) -> 
outcome.Outcome[WriteAsCommitteeParticipant]:
         if self.__authorisation.asf_uid is None:
-            return outcome.Error(AccessError("No ASF UID"))
+            return outcome.Error(AccessError("Not authorized"))
         if not self.__authorisation.is_participant_of(committee_name):
             return outcome.Error(AccessError(f"Not a participant of 
{committee_name}"))
         try:
@@ -300,7 +298,7 @@ class Write:
 
     def as_foundation_committer_outcome(self) -> 
outcome.Outcome[WriteAsFoundationCommitter]:
         if self.__authorisation.asf_uid is None:
-            return outcome.Error(AccessError("No ASF UID"))
+            return outcome.Error(AccessError("Not authorized"))
         try:
             wafm = WriteAsFoundationCommitter(self, self.__data)
         except Exception as e:
@@ -312,7 +310,7 @@ class Write:
 
     def as_foundation_admin_outcome(self, committee_name: str) -> 
outcome.Outcome[WriteAsFoundationAdmin]:
         if self.__authorisation.asf_uid is None:
-            return outcome.Error(AccessError("No ASF UID"))
+            return outcome.Error(AccessError("Not authorized"))
         if not user.is_admin(self.__authorisation.asf_uid):
             return outcome.Error(AccessError("Not an admin"))
         try:
@@ -343,9 +341,9 @@ class Write:
             AccessError(f"Project not found: {project_name}")
         )
         if project.committee is None:
-            return outcome.Error(AccessError("No committee found for project"))
+            return outcome.Error(AccessError("No committee found for project - 
Invalid state"))
         if self.__authorisation.asf_uid is None:
-            return outcome.Error(AccessError("No ASF UID"))
+            return outcome.Error(AccessError("Not authorized"))
         if not self.__authorisation.is_member_of(project.committee.name):
             return outcome.Error(AccessError(f"Not a member of 
{project.committee.name}"))
         try:
@@ -365,9 +363,9 @@ class Write:
             AccessError(f"Project not found: {project_name}")
         )
         if project.committee is None:
-            return outcome.Error(AccessError("No committee found for project"))
+            return outcome.Error(AccessError("No committee found for project - 
Invalid state"))
         if self.__authorisation.asf_uid is None:
-            return outcome.Error(AccessError("No ASF UID"))
+            return outcome.Error(AccessError("Not authorized"))
         if not self.__authorisation.is_participant_of(project.committee.name):
             return outcome.Error(AccessError(f"Not a participant of 
{project.committee.name}"))
         try:
diff --git a/atr/storage/readers/checks.py b/atr/storage/readers/checks.py
index 8cf44b1..3b8de1b 100644
--- a/atr/storage/readers/checks.py
+++ b/atr/storage/readers/checks.py
@@ -46,9 +46,9 @@ class GeneralPublic:
 
     async def by_release_path(self, release: sql.Release, rel_path: 
pathlib.Path) -> types.CheckResults:
         if release.committee is None:
-            raise ValueError("Release has no committee")
+            raise ValueError("Release has no committee - Invalid state")
         if release.latest_revision_number is None:
-            raise ValueError("Release has no revision")
+            raise ValueError("Release has no revision - Invalid state")
 
         query = self.__data.check_result(
             release_name=release.name,
diff --git a/atr/storage/readers/releases.py b/atr/storage/readers/releases.py
index 9d2a157..8a3bff9 100644
--- a/atr/storage/readers/releases.py
+++ b/atr/storage/readers/releases.py
@@ -116,7 +116,7 @@ class GeneralPublic:
         self, release: sql.Release, latest_revision_number: str, info: 
types.PathInfo
     ) -> None:
         if release.committee is None:
-            raise ValueError("Release has no committee")
+            raise ValueError("Release has no committee - Invalid state")
 
         match_ignore = await 
self.__read_as.checks.ignores_matcher(release.committee.name)
 
diff --git a/atr/storage/readers/tokens.py b/atr/storage/readers/tokens.py
index d892042..c0ebac0 100644
--- a/atr/storage/readers/tokens.py
+++ b/atr/storage/readers/tokens.py
@@ -43,7 +43,7 @@ class FoundationCommitter(GeneralPublic):
     async def own_personal_access_tokens(self) -> 
list[sql.PersonalAccessToken]:
         asf_uid = self.__read.authorisation.asf_uid
         if asf_uid is None:
-            raise ValueError("An ASF UID is required")
+            raise ValueError("Not authorized")
         via = sql.validate_instrumented_attribute
         stmt = (
             sqlmodel.select(sql.PersonalAccessToken)
@@ -57,7 +57,7 @@ class FoundationCommitter(GeneralPublic):
         # if asf_uid is None:
         asf_uid = self.__read.authorisation.asf_uid
         if asf_uid is None:
-            raise ValueError("An ASF UID is required")
+            raise ValueError("Not authorized")
         via = sql.validate_instrumented_attribute
         stmt = (
             sqlmodel.select(sql.PersonalAccessToken)
diff --git a/atr/storage/writers/announce.py b/atr/storage/writers/announce.py
index cbf9692..647a1d6 100644
--- a/atr/storage/writers/announce.py
+++ b/atr/storage/writers/announce.py
@@ -59,7 +59,7 @@ class FoundationCommitter(GeneralPublic):
         self.__data = data
         asf_uid = write.authorisation.asf_uid
         if asf_uid is None:
-            raise storage.AccessError("No ASF UID")
+            raise storage.AccessError("Not authorized")
         self.__asf_uid = asf_uid
 
 
@@ -77,7 +77,7 @@ class CommitteeParticipant(FoundationCommitter):
         self.__data = data
         asf_uid = write.authorisation.asf_uid
         if asf_uid is None:
-            raise storage.AccessError("No ASF UID")
+            raise storage.AccessError("Not authorized")
         self.__asf_uid = asf_uid
         self.__committee_name = committee_name
 
@@ -96,7 +96,7 @@ class CommitteeMember(CommitteeParticipant):
         self.__data = data
         asf_uid = write.authorisation.asf_uid
         if asf_uid is None:
-            raise storage.AccessError("No ASF UID")
+            raise storage.AccessError("Not authorized")
         self.__asf_uid = asf_uid
         self.__committee_name = committee_name
 
@@ -131,7 +131,7 @@ class CommitteeMember(CommitteeParticipant):
             )
         )
         if (committee := release.project.committee) is None:
-            raise storage.AccessError("Release has no committee")
+            raise storage.AccessError("Release has no committee - Invalid 
state")
 
         # Fetch the current subject template and verify the hash
         subject_template = await 
construct.announce_release_subject_default(project_name)
diff --git a/atr/storage/writers/cache.py b/atr/storage/writers/cache.py
index 6cccb8c..764cdf1 100644
--- a/atr/storage/writers/cache.py
+++ b/atr/storage/writers/cache.py
@@ -71,7 +71,7 @@ class FoundationCommitter(GeneralPublic):
         self.__data = data
         asf_uid = write.authorisation.asf_uid
         if asf_uid is None:
-            raise storage.AccessError("No ASF UID")
+            raise storage.AccessError("Not authorized")
         self.__asf_uid = asf_uid
 
 
@@ -89,7 +89,7 @@ class CommitteeParticipant(FoundationCommitter):
         self.__data = data
         asf_uid = write.authorisation.asf_uid
         if asf_uid is None:
-            raise storage.AccessError("No ASF UID")
+            raise storage.AccessError("Not authorized")
         self.__asf_uid = asf_uid
         self.__committee_name = committee_name
 
@@ -108,6 +108,6 @@ class CommitteeMember(CommitteeParticipant):
         self.__data = data
         asf_uid = write.authorisation.asf_uid
         if asf_uid is None:
-            raise storage.AccessError("No ASF UID")
+            raise storage.AccessError("Not authorized")
         self.__asf_uid = asf_uid
         self.__committee_name = committee_name
diff --git a/atr/storage/writers/checks.py b/atr/storage/writers/checks.py
index 28b4fa2..1665119 100644
--- a/atr/storage/writers/checks.py
+++ b/atr/storage/writers/checks.py
@@ -48,7 +48,7 @@ class FoundationCommitter(GeneralPublic):
         self.__data = data
         asf_uid = write.authorisation.asf_uid
         if asf_uid is None:
-            raise storage.AccessError("No ASF UID")
+            raise storage.AccessError("Not authorized")
         self.__asf_uid = asf_uid
 
 
@@ -66,7 +66,7 @@ class CommitteeParticipant(FoundationCommitter):
         self.__data = data
         asf_uid = write.authorisation.asf_uid
         if asf_uid is None:
-            raise storage.AccessError("No ASF UID")
+            raise storage.AccessError("Not authorized")
         self.__asf_uid = asf_uid
         self.__committee_name = committee_name
 
@@ -85,7 +85,7 @@ class CommitteeMember(CommitteeParticipant):
         self.__data = data
         asf_uid = write.authorisation.asf_uid
         if asf_uid is None:
-            raise storage.AccessError("No ASF UID")
+            raise storage.AccessError("Not authorized")
         self.__asf_uid = asf_uid
         self.__committee_name = committee_name
 
diff --git a/atr/storage/writers/distributions.py 
b/atr/storage/writers/distributions.py
index 484cb60..542012e 100644
--- a/atr/storage/writers/distributions.py
+++ b/atr/storage/writers/distributions.py
@@ -56,7 +56,7 @@ class FoundationCommitter(GeneralPublic):
         self.__data = data
         asf_uid = write.authorisation.asf_uid
         if asf_uid is None:
-            raise storage.AccessError("No ASF UID")
+            raise storage.AccessError("Not authorized")
         self.__asf_uid = asf_uid
 
 
@@ -74,7 +74,7 @@ class CommitteeParticipant(FoundationCommitter):
         self.__data = data
         asf_uid = write.authorisation.asf_uid
         if asf_uid is None:
-            raise storage.AccessError("No ASF UID")
+            raise storage.AccessError("Not authorized")
         self.__asf_uid = asf_uid
         self.__committee_name = committee_name
 
@@ -93,7 +93,7 @@ class CommitteeMember(CommitteeParticipant):
         self.__data = data
         asf_uid = write.authorisation.asf_uid
         if asf_uid is None:
-            raise storage.AccessError("No ASF UID")
+            raise storage.AccessError("Not authorized")
         self.__asf_uid = asf_uid
         self.__committee_name = committee_name
 
diff --git a/atr/storage/writers/keys.py b/atr/storage/writers/keys.py
index 584db4f..ae0e78f 100644
--- a/atr/storage/writers/keys.py
+++ b/atr/storage/writers/keys.py
@@ -66,7 +66,7 @@ class FoundationCommitter(GeneralPublic):
         self.__data = data
         asf_uid = write.authorisation.asf_uid
         if asf_uid is None:
-            raise storage.AccessError("No ASF UID")
+            raise storage.AccessError("Not authorized")
         self.__asf_uid = asf_uid
 
         # Specific to this module
@@ -374,7 +374,7 @@ class CommitteeParticipant(FoundationCommitter):
         self.__data = data
         asf_uid = write.authorisation.asf_uid
         if asf_uid is None:
-            raise storage.AccessError("No ASF UID")
+            raise storage.AccessError("Not authorized")
         self.__asf_uid = asf_uid
         self.__committee_name = committee_name
 
@@ -471,7 +471,7 @@ class CommitteeParticipant(FoundationCommitter):
         async with aiofiles.open(keys_path, encoding="utf-8") as f:
             keys_file_text = await f.read()
         if release.committee is None:
-            raise storage.AccessError("No committee found for release")
+            raise storage.AccessError("No committee found for release - 
Invalid state")
         if release.committee.name != self.__committee_name:
             raise storage.AccessError(
                 f"Release {project_name} {version_name} is not associated with 
committee {self.__committee_name}"
@@ -639,7 +639,7 @@ class CommitteeMember(CommitteeParticipant):
         self.__data = data
         asf_uid = write.authorisation.asf_uid
         if asf_uid is None:
-            raise storage.AccessError("No ASF UID")
+            raise storage.AccessError("Not authorized")
         self.__asf_uid = asf_uid
         self.__committee_name = committee_name
 
@@ -658,7 +658,7 @@ class FoundationAdmin(CommitteeMember):
         self.__data = data
         asf_uid = write.authorisation.asf_uid
         if asf_uid is None:
-            raise storage.AccessError("No ASF UID")
+            raise storage.AccessError("Not authorized")
         self.__asf_uid = asf_uid
         self.__committee_name = committee_name
 
diff --git a/atr/storage/writers/policy.py b/atr/storage/writers/policy.py
index 83cede0..cb61e86 100644
--- a/atr/storage/writers/policy.py
+++ b/atr/storage/writers/policy.py
@@ -52,7 +52,7 @@ class FoundationCommitter(GeneralPublic):
         self.__data = data
         asf_uid = write.authorisation.asf_uid
         if asf_uid is None:
-            raise storage.AccessError("No ASF UID")
+            raise storage.AccessError("Not authorized")
         self.__asf_uid = asf_uid
 
 
@@ -70,7 +70,7 @@ class CommitteeParticipant(FoundationCommitter):
         self.__data = data
         asf_uid = write.authorisation.asf_uid
         if asf_uid is None:
-            raise storage.AccessError("No ASF UID")
+            raise storage.AccessError("Not authorized")
         self.__asf_uid = asf_uid
         self.__committee_name = committee_name
 
@@ -89,7 +89,7 @@ class CommitteeMember(CommitteeParticipant):
         self.__data = data
         asf_uid = write.authorisation.asf_uid
         if asf_uid is None:
-            raise storage.AccessError("No ASF UID")
+            raise storage.AccessError("Not authorized")
         self.__asf_uid = asf_uid
         self.__committee_name = committee_name
 
diff --git a/atr/storage/writers/project.py b/atr/storage/writers/project.py
index 3763fca..69a3b8c 100644
--- a/atr/storage/writers/project.py
+++ b/atr/storage/writers/project.py
@@ -48,7 +48,7 @@ class FoundationCommitter(GeneralPublic):
         self.__data = data
         asf_uid = write.authorisation.asf_uid
         if asf_uid is None:
-            raise storage.AccessError("No ASF UID")
+            raise storage.AccessError("Not authorized")
         self.__asf_uid = asf_uid
 
 
@@ -66,7 +66,7 @@ class CommitteeParticipant(FoundationCommitter):
         self.__data = data
         asf_uid = write.authorisation.asf_uid
         if asf_uid is None:
-            raise storage.AccessError("No ASF UID")
+            raise storage.AccessError("Not authorized")
         self.__asf_uid = asf_uid
         self.__committee_name = committee_name
 
@@ -85,7 +85,7 @@ class CommitteeMember(CommitteeParticipant):
         self.__data = data
         asf_uid = write.authorisation.asf_uid
         if asf_uid is None:
-            raise storage.AccessError("No ASF UID")
+            raise storage.AccessError("Not authorized")
         self.__asf_uid = asf_uid
         self.__committee_name = committee_name
 
diff --git a/atr/storage/writers/release.py b/atr/storage/writers/release.py
index dd17174..111a5bf 100644
--- a/atr/storage/writers/release.py
+++ b/atr/storage/writers/release.py
@@ -72,7 +72,7 @@ class FoundationCommitter(GeneralPublic):
         self.__data = data
         asf_uid = write.authorisation.asf_uid
         if asf_uid is None:
-            raise storage.AccessError("No ASF UID")
+            raise storage.AccessError("Not authorized")
         self.__asf_uid = asf_uid
 
 
@@ -90,7 +90,7 @@ class CommitteeParticipant(FoundationCommitter):
         self.__data = data
         asf_uid = write.authorisation.asf_uid
         if asf_uid is None:
-            raise storage.AccessError("No ASF UID")
+            raise storage.AccessError("Not authorized")
         self.__asf_uid = asf_uid
         self.__committee_name = committee_name
 
@@ -725,7 +725,7 @@ class CommitteeMember(CommitteeParticipant):
         self.__data = data
         asf_uid = write.authorisation.asf_uid
         if asf_uid is None:
-            raise storage.AccessError("No ASF UID")
+            raise storage.AccessError("Not authorized")
         self.__asf_uid = asf_uid
         self.__committee_name = committee_name
 
@@ -740,6 +740,6 @@ class FoundationAdmin(CommitteeMember):
         self.__data = data
         asf_uid = write.authorisation.asf_uid
         if asf_uid is None:
-            raise storage.AccessError("No ASF UID")
+            raise storage.AccessError("Not authorized")
         self.__asf_uid = asf_uid
         self.__committee_name = committee_name
diff --git a/atr/storage/writers/revision.py b/atr/storage/writers/revision.py
index f7037c6..dc08d43 100644
--- a/atr/storage/writers/revision.py
+++ b/atr/storage/writers/revision.py
@@ -82,7 +82,7 @@ class FoundationCommitter(GeneralPublic):
         self.__data = data
         asf_uid = write.authorisation.asf_uid
         if asf_uid is None:
-            raise storage.AccessError("No ASF UID")
+            raise storage.AccessError("Not authorized")
         self.__asf_uid = asf_uid
 
 
@@ -100,7 +100,7 @@ class CommitteeParticipant(FoundationCommitter):
         self.__data = data
         asf_uid = write.authorisation.asf_uid
         if asf_uid is None:
-            raise storage.AccessError("No ASF UID")
+            raise storage.AccessError("Not authorized")
         self.__asf_uid = asf_uid
         self.__committee_name = committee_name
 
@@ -238,6 +238,6 @@ class CommitteeMember(CommitteeParticipant):
         self.__data = data
         asf_uid = write.authorisation.asf_uid
         if asf_uid is None:
-            raise storage.AccessError("No ASF UID")
+            raise storage.AccessError("Not authorized")
         self.__asf_uid = asf_uid
         self.__committee_name = committee_name
diff --git a/atr/storage/writers/sbom.py b/atr/storage/writers/sbom.py
index 7745cb7..4e89d61 100644
--- a/atr/storage/writers/sbom.py
+++ b/atr/storage/writers/sbom.py
@@ -52,7 +52,7 @@ class FoundationCommitter(GeneralPublic):
         self.__data = data
         asf_uid = write.authorisation.asf_uid
         if asf_uid is None:
-            raise storage.AccessError("No ASF UID")
+            raise storage.AccessError("Not authorized")
         self.__asf_uid = asf_uid
 
 
@@ -70,7 +70,7 @@ class CommitteeParticipant(FoundationCommitter):
         self.__data = data
         asf_uid = write.authorisation.asf_uid
         if asf_uid is None:
-            raise storage.AccessError("No ASF UID")
+            raise storage.AccessError("Not authorized")
         self.__asf_uid = asf_uid
         self.__committee_name = committee_name
 
@@ -175,6 +175,6 @@ class CommitteeMember(CommitteeParticipant):
         self.__data = data
         asf_uid = write.authorisation.asf_uid
         if asf_uid is None:
-            raise storage.AccessError("No ASF UID")
+            raise storage.AccessError("Not authorized")
         self.__asf_uid = asf_uid
         self.__committee_name = committee_name
diff --git a/atr/storage/writers/ssh.py b/atr/storage/writers/ssh.py
index af8e717..932d867 100644
--- a/atr/storage/writers/ssh.py
+++ b/atr/storage/writers/ssh.py
@@ -47,7 +47,7 @@ class FoundationCommitter(GeneralPublic):
         self.__data = data
         asf_uid = write.authorisation.asf_uid
         if asf_uid is None:
-            raise storage.AccessError("No ASF UID")
+            raise storage.AccessError("Not authorized")
         self.__asf_uid = asf_uid
 
     async def add_key(self, key: str, asf_uid: str) -> str:
@@ -79,7 +79,7 @@ class CommitteeParticipant(FoundationCommitter):
         self.__data = data
         asf_uid = write.authorisation.asf_uid
         if asf_uid is None:
-            raise storage.AccessError("No ASF UID")
+            raise storage.AccessError("Not authorized")
         self.__asf_uid = asf_uid
         self.__committee_name = committee_name
 
@@ -125,6 +125,6 @@ class CommitteeMember(CommitteeParticipant):
         self.__data = data
         asf_uid = write.authorisation.asf_uid
         if asf_uid is None:
-            raise storage.AccessError("No ASF UID")
+            raise storage.AccessError("Not authorized")
         self.__asf_uid = asf_uid
         self.__committee_name = committee_name
diff --git a/atr/storage/writers/tokens.py b/atr/storage/writers/tokens.py
index d7d8001..0877112 100644
--- a/atr/storage/writers/tokens.py
+++ b/atr/storage/writers/tokens.py
@@ -55,7 +55,7 @@ class FoundationCommitter(GeneralPublic):
         self.__data = data
         asf_uid = write.authorisation.asf_uid
         if asf_uid is None:
-            raise storage.AccessError("No ASF UID")
+            raise storage.AccessError("Not authorized")
         self.__asf_uid = asf_uid
 
     async def add_token(
@@ -140,7 +140,7 @@ class CommitteeParticipant(FoundationCommitter):
         self.__data = data
         asf_uid = write.authorisation.asf_uid
         if asf_uid is None:
-            raise storage.AccessError("No ASF UID")
+            raise storage.AccessError("Not authorized")
         self.__asf_uid = asf_uid
         self.__committee_name = committee_name
 
@@ -159,6 +159,6 @@ class CommitteeMember(CommitteeParticipant):
         self.__data = data
         asf_uid = write.authorisation.asf_uid
         if asf_uid is None:
-            raise storage.AccessError("No ASF UID")
+            raise storage.AccessError("Not authorized")
         self.__asf_uid = asf_uid
         self.__committee_name = committee_name
diff --git a/atr/storage/writers/vote.py b/atr/storage/writers/vote.py
index bd4bd87..61199a8 100644
--- a/atr/storage/writers/vote.py
+++ b/atr/storage/writers/vote.py
@@ -53,7 +53,7 @@ class FoundationCommitter(GeneralPublic):
         self.__data = data
         asf_uid = write.authorisation.asf_uid
         if asf_uid is None:
-            raise storage.AccessError("No ASF UID")
+            raise storage.AccessError("Not authorized")
         self.__asf_uid = asf_uid
 
 
@@ -71,7 +71,7 @@ class CommitteeParticipant(FoundationCommitter):
         self.__data = data
         asf_uid = write.authorisation.asf_uid
         if asf_uid is None:
-            raise storage.AccessError("No ASF UID")
+            raise storage.AccessError("Not authorized")
         self.__asf_uid = asf_uid
         self.__committee_name = committee_name
 
@@ -214,7 +214,7 @@ class CommitteeMember(CommitteeParticipant):
         self.__data = data
         asf_uid = write.authorisation.asf_uid
         if asf_uid is None:
-            raise storage.AccessError("No ASF UID")
+            raise storage.AccessError("Not authorized")
         self.__asf_uid = asf_uid
         self.__committee_name = committee_name
 
@@ -246,7 +246,7 @@ class CommitteeMember(CommitteeParticipant):
         if is_podling is True:
             voting_round = 1 if (podling_thread_id is None) else 2
         if release.committee is None:
-            raise ValueError("Project has no committee")
+            raise ValueError("Project has no committee - Invalid state")
 
         return await self.resolve_release(
             project_name,
@@ -322,10 +322,10 @@ class CommitteeMember(CommitteeParticipant):
             # incubator_vote_address = "[email protected]"
             incubator_vote_address = util.USER_TESTS_ADDRESS
             if not release.project.committee:
-                raise ValueError("Project has no committee")
+                raise ValueError("Project has no committee - Invalid state")
             revision_number = release.latest_revision_number
             if revision_number is None:
-                raise ValueError("Release has no revision number")
+                raise ValueError("Release has no revision number - Invalid 
state")
             vote_duration = latest_vote_task.task_args["vote_duration"]
             subject_template = await 
construct.start_vote_subject_default(release.project.name)
             body_template = await 
construct.start_vote_default(release.project.name)
diff --git a/atr/storage/writers/workflowstatus.py 
b/atr/storage/writers/workflowstatus.py
index 2aa92cf..f944c79 100644
--- a/atr/storage/writers/workflowstatus.py
+++ b/atr/storage/writers/workflowstatus.py
@@ -44,7 +44,7 @@ class FoundationCommitter(GeneralPublic):
         self.__data = data
         asf_uid = write.authorisation.asf_uid
         if asf_uid is None:
-            raise storage.AccessError("No ASF UID")
+            raise storage.AccessError("Not authorized")
         self.__asf_uid = asf_uid
 
     # async def add_key(self, key: str, asf_uid: str) -> str:
@@ -76,7 +76,7 @@ class CommitteeParticipant(FoundationCommitter):
         self.__data = data
         asf_uid = write.authorisation.asf_uid
         if asf_uid is None:
-            raise storage.AccessError("No ASF UID")
+            raise storage.AccessError("Not authorized")
         self.__asf_uid = asf_uid
         self.__committee_name = committee_name
 
@@ -95,7 +95,7 @@ class CommitteeMember(CommitteeParticipant):
         self.__data = data
         asf_uid = write.authorisation.asf_uid
         if asf_uid is None:
-            raise storage.AccessError("No ASF UID")
+            raise storage.AccessError("Not authorized")
         self.__asf_uid = asf_uid
         self.__committee_name = committee_name
 


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to