Skip to content

Commit be94aa6

Browse files
Update incorrect usages of OrgNotFound to ProjectNotFound (#1916)
Additionally, enhance the error message for ProjectNotFound to indicate to users that an incorrect project slug or an incorrect org slug can cause this error Fixes GH-1911
1 parent aa29477 commit be94aa6

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/api.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -242,7 +242,7 @@ pub enum ApiErrorKind {
242242
OrganizationNotFound,
243243
#[error("resource not found")]
244244
ResourceNotFound,
245-
#[error("project not found")]
245+
#[error("Project not found. Please check that you entered the project and organization slugs correctly.")]
246246
ProjectNotFound,
247247
#[error("release not found")]
248248
ReleaseNotFound,
@@ -1642,7 +1642,7 @@ impl Api {
16421642

16431643
if resp.status() == 404 || (resp.status() == 400 && !cursor.is_empty()) {
16441644
if rv.is_empty() {
1645-
return Err(ApiErrorKind::OrganizationNotFound.into());
1645+
return Err(ApiErrorKind::ProjectNotFound.into());
16461646
} else {
16471647
break;
16481648
}
@@ -1695,7 +1695,7 @@ impl Api {
16951695

16961696
if resp.status() == 404 || (resp.status() == 400 && !cursor.is_empty()) {
16971697
if rv.is_empty() {
1698-
return Err(ApiErrorKind::OrganizationNotFound.into());
1698+
return Err(ApiErrorKind::ProjectNotFound.into());
16991699
} else {
17001700
break;
17011701
}

0 commit comments

Comments
 (0)