Skip to content

Commit 81945a3

Browse files
committed
Rename httpError parameter to payload
Change httpError signature from (message, status, body) to (message, status, payload) and set error.payload = payload. Note: the conditional still checks 'body !== undefined', which appears to be an inconsistent leftover and may prevent payload from being attached; update the check to 'payload !== undefined' as a follow-up.
1 parent 0640e64 commit 81945a3

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

rest.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@ const acceptedJsonContentTypes = new Set([
33
"application/ld+json"
44
])
55

6-
export function httpError(message, status = 500, body) {
6+
export function httpError(message, status = 500, payload) {
77
const error = new Error(message)
88
error.status = status
99
if (body !== undefined) {
10-
error.payload = body
10+
error.payload = payload
1111
}
1212
return error
1313
}

0 commit comments

Comments
 (0)