Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion css/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -1210,6 +1210,7 @@ h2 a {
.table-scroller {
width: 100%;
overflow: scroll;
scrollbar-width: thin;
}

code {
Expand Down Expand Up @@ -1443,7 +1444,8 @@ h2 a {
padding: 0;
border: 0;
width: 960px;
margin-bottom: 20px;}
margin-bottom: 20px;
}
#mw-fig-imgcell {
margin: 0;
padding: 0px;
Expand Down
2 changes: 2 additions & 0 deletions en/guide/writing-middleware.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ If the current middleware function does not end the request-response cycle, it m

The following figure shows the elements of a middleware function call:

<div class="table-scroller">
<table id="mw-fig">
<tr><td id="mw-fig-imgcell">
<img src="/images/express-mw.png" alt="Elements of a middleware function call" id="mw-fig-img" />
Expand All @@ -42,6 +43,7 @@ The following figure shows the elements of a middleware function call:
<div class="callout" id="callout6">HTTP <a href="/{{ page.lang }}/4x/api.html#req">request</a> argument to the middleware function, called "req" by convention.</div>
</td></tr>
</table>
</div>

Starting with Express 5, middleware functions that return a Promise will call `next(value)` when they reject or throw an error. `next` will be called with either the rejected value or the thrown Error.

Expand Down