iamshaunjp / iamshaunjp/nextjs-masterclass
Lesson 32 : Unhandled Runtime Error ReferenceError: error is not defined
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 168
- Forks
- 87
- PR merge metrics
- No merged PRs in 30d
Description
Error when submitting the form in order to add the first ticket.
Unhandled Runtime Error
ReferenceError: error is not defined
Source
app(dashboard)\tickets\create\CreateForm.jsx (29:18) @ error
27 |
28 | if (json.error) {
29 | console.log(error.message)
| ^
30 | }
31 | if (json.data) {
32 | router.refresh()
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the first-ticket submission error and inspect app/(dashboard)/tickets/create/CreateForm.jsx around line 29, especially the json.error branch. Confirm the error path can be reached without a ReferenceError and that successful submissions still follow the existing json.data path.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, nextjs
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 1/5
- Estimated time
- Under an hour
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 45/100