Skip to content

Commit bbd8f89

Browse files
author
raphaelrobert
committed
Align error code with RFC9578
1 parent 619c72e commit bbd8f89

File tree

1 file changed

+14
-15
lines changed

1 file changed

+14
-15
lines changed

draft-ietf-privacypass-batched-tokens.md

+14-15
Original file line numberDiff line numberDiff line change
@@ -192,16 +192,16 @@ Upon receipt of the request, the Issuer validates the following conditions:
192192
less than or equal to the number of tokens that the issuer can issue in a
193193
single batch.
194194

195-
If any of these conditions is not met, the Issuer MUST return an HTTP 400 error
196-
to the client.
195+
If any of these conditions is not met, the Issuer MUST return an HTTP 422
196+
(Unprocessable Content) error to the client.
197197

198-
The Issuer then tries to deseralize the i-th element
199-
of BatchTokenRequest.blinded_elements using DeserializeElement from {{Section 2.1 of
200-
OPRF}}, yielding `blinded_element_i` of type `Element`. If this fails for any of
201-
the BatchTokenRequest.blinded_elements values, the Issuer MUST return an HTTP 400
202-
error to the client. Otherwise, if the Issuer is willing to produce a token to
203-
the Client, the issuer forms a list of `Element` values, denoted
204-
`blinded_elements`, and computes a blinded response as follows:
198+
The Issuer then tries to deseralize the i-th element of
199+
BatchTokenRequest.blinded_elements using DeserializeElement from {{Section 2.1
200+
of OPRF}}, yielding `blinded_element_i` of type `Element`. If this fails for any
201+
of the BatchTokenRequest.blinded_elements values, the Issuer MUST return an HTTP
202+
422 (Unprocessable Content) error to the client. Otherwise, if the Issuer is
203+
willing to produce a token to the Client, the issuer forms a list of `Element`
204+
values, denoted `blinded_elements`, and computes a blinded response as follows:
205205

206206
~~~
207207
server_context = SetupVOPRFServer(ciphersuiteID, skI, pkI)
@@ -409,14 +409,13 @@ Upon receipt of the request, the Issuer validates the following conditions:
409409

410410
- The Content-Type is application/private-token-arbitrary-batch-request as registered with IANA.
411411

412-
If this condition is not met, the Issuer MUST return an HTTP 400 error
412+
If this condition is not met, the Issuer MUST return an HTTP 422 (Unprocessable Content) error
413413
to the client.
414414

415-
The Issuer then tries to deserialize the first 2 bytes of the i-th element
416-
of BatchTokenRequest.token_requests.
417-
If this is not a token type registered with IANA, the Issuer MUST return an HTTP 400 error
418-
to the client.
419-
The issuer creates a BatchTokenResponse structured as follows:
415+
The Issuer then tries to deserialize the first 2 bytes of the i-th element of
416+
BatchTokenRequest.token_requests. If this is not a token type registered with
417+
IANA, the Issuer MUST return an HTTP 422 (Unprocessable Content) error to the
418+
client. The issuer creates a BatchTokenResponse structured as follows:
420419

421420
~~~tls
422421
struct {

0 commit comments

Comments
 (0)