rsnext/errors/render-no-starting-slash.md
Joey Tepperman cdc7f01954
Add warning when a page is rendered without a starting / (#11418)
* Add error/warning when a page is rendered without a /

Throws an error for development and gives a warning in production

* Add tests for error when rendering without starting slash

* Update to always warn and add err.sh

* Update errors/render-no-starting-slash.md

Co-authored-by: JJ Kasper <jj@jjsweb.site>
Co-authored-by: Tim Neutkens <tim@timneutkens.nl>
2020-04-06 11:54:42 -05:00

9 lines
324 B
Markdown

# Rendering Without Starting Slash
#### Why This Error Occurred
When calling `app.render(req, res, path)` the `path` did not begin with a slash (`/`). This causes unexpected behavior and should be corrected.
#### Possible Ways to Fix It
Make sure the `path` being passed to `app.render` always starts with a slash (`/`)