Commit dc0ea8a
committed
Catch fetchDeployMetadata error and redirect to 404 (#5380)
## Problem solved
Short description of the bug fixed or feature added
<!-- start pr-codex -->
---
## PR-Codex overview
This PR enhances error handling in the `page.tsx` files for the `publish` and `deploy` routes. It introduces checks to call `notFound()` when metadata cannot be fetched, improving user experience by handling cases where the requested data is unavailable.
### Detailed summary
- In `apps/dashboard/src/app/(dashboard)/contracts/publish/[publish_uri]/page.tsx`:
- Added a check for `publishMetadataFromUri` and called `notFound()` if it is not present.
- In `apps/dashboard/src/app/(dashboard)/contracts/deploy/[compiler_uri]/page.tsx`:
- Added a check for `metadata` and called `notFound()` if it is not present.
> ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}`
<!-- end pr-codex -->1 parent e4b4008 commit dc0ea8a
2 files changed
+12
-2
lines changedLines changed: 7 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
| 2 | + | |
2 | 3 | | |
3 | 4 | | |
4 | 5 | | |
| |||
16 | 17 | | |
17 | 18 | | |
18 | 19 | | |
19 | | - | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
20 | 26 | | |
21 | 27 | | |
22 | 28 | | |
| |||
Lines changed: 5 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
28 | | - | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
29 | 33 | | |
30 | 34 | | |
31 | 35 | | |
| |||
0 commit comments