docs: fix code block extension on `after` and `error handling` (#73844)
## Summary
Both `app/actions.ts` and `app/action.js` aren't JSX in [error
handling](https://nextjs.org/docs/app/building-your-application/routing/error-handling)
docs.
`app/api/route.ts` and `app/api/route.js` aren't also JSX in
[after](https://nextjs.org/docs/app/api-reference/functions/after) docs.
### Improving Documentation
- [x] Run `pnpm prettier-fix` to fix formatting issues before opening
the PR.
- [x] Read the Docs Contribution Guide to ensure your contribution
follows the docs guidelines:
https://nextjs.org/docs/community/contribution-guide
Co-authored-by: JJ Kasper <jj@jjsweb.site>