Skip to content

Commit 8a6a961

Browse files
runningcodeclaude
authored andcommitted
feat(build): Improve error messages for nonexistent projects/orgs
When build upload fails due to nonexistent project or organization, now provides clearer error messages with specific guidance: - Shows "Project not found" with guidance to check --project and --org flags - Shows "Organization not found" with guidance to check --org flag - Preserves original error messages for other error types Resolves EME-175: Missing error message on build upload with nonexistent project 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
1 parent d4ed4c4 commit 8a6a961

File tree

1 file changed

+15
-1
lines changed

1 file changed

+15
-1
lines changed

src/commands/build/upload.rs

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -325,7 +325,21 @@ pub fn execute(matches: &ArgMatches) -> Result<()> {
325325
}
326326
);
327327
for (path, reason) in errored_paths_and_reasons {
328-
warn!(" - {} ({})", path.display(), reason);
328+
let reason_str = reason.to_string();
329+
// Check if this is a specific API error we can provide better messaging for
330+
if reason_str.contains("Project not found") {
331+
warn!(" - {}", path.display());
332+
warn!(" Project not found. Ensure that you configured the correct project and organization.");
333+
warn!(" Use --project and --org flags to specify the correct values.");
334+
} else if reason_str.contains("organization not found")
335+
|| reason_str.contains("Organization not found")
336+
{
337+
warn!(" - {}", path.display());
338+
warn!(" Organization not found. Ensure that you configured the correct organization.");
339+
warn!(" Use --org flag to specify the correct organization.");
340+
} else {
341+
warn!(" - {} ({})", path.display(), reason);
342+
}
329343
}
330344
}
331345

0 commit comments

Comments
 (0)