Skip to content

Commit 9622ea0

Browse files
committed
fix(server): Accepting application/json SHOULD use status code 200
1 parent e8462c9 commit 9622ea0

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/audits/server.ts

+5-5
Original file line numberDiff line numberDiff line change
@@ -253,7 +253,7 @@ export function serverAudits(opts: ServerAuditOptions): Audit[] {
253253
},
254254
),
255255
audit(
256-
'MUST use 200 status code with errors field on missing {query} parameter when accepting application/json',
256+
'SHOULD use 200 status code with errors field on missing {query} parameter when accepting application/json',
257257
async () => {
258258
const res = await fetchFn(opts.url, {
259259
method: 'POST',
@@ -293,7 +293,7 @@ export function serverAudits(opts: ServerAuditOptions): Audit[] {
293293
),
294294
...[{ obj: 'ect' }, 0, false, ['array']].map((invalid) =>
295295
audit(
296-
`MUST use 200 status code with errors field on ${extendedTypeof(
296+
`SHOULD use 200 status code with errors field on ${extendedTypeof(
297297
invalid,
298298
)} {query} parameter when accepting application/json`,
299299
async () => {
@@ -376,7 +376,7 @@ export function serverAudits(opts: ServerAuditOptions): Audit[] {
376376
),
377377
...[{ obj: 'ect' }, 0, false, ['array']].map((invalid) =>
378378
audit(
379-
`MUST use 200 status code with errors field on ${extendedTypeof(
379+
`SHOULD use 200 status code with errors field on ${extendedTypeof(
380380
invalid,
381381
)} {operationName} parameter when accepting application/json`,
382382
async () => {
@@ -462,7 +462,7 @@ export function serverAudits(opts: ServerAuditOptions): Audit[] {
462462
),
463463
...['string', 0, false, ['array']].map((invalid) =>
464464
audit(
465-
`MUST use 200 status code with errors field on ${extendedTypeof(
465+
`SHOULD use 200 status code with errors field on ${extendedTypeof(
466466
invalid,
467467
)} {variables} parameter when accepting application/json`,
468468
async () => {
@@ -591,7 +591,7 @@ export function serverAudits(opts: ServerAuditOptions): Audit[] {
591591
),
592592
...['string', 0, false, ['array']].map((invalid) =>
593593
audit(
594-
`MUST use 200 status code with errors field on ${extendedTypeof(
594+
`SHOULD use 200 status code with errors field on ${extendedTypeof(
595595
invalid,
596596
)} {extensions} parameter when accepting application/json`,
597597
async () => {

0 commit comments

Comments
 (0)