You are viewing a plain text version of this content. The canonical link for it is here.
Posted to server-dev@james.apache.org by "René Cordier (Jira)" <se...@james.apache.org> on 2020/03/09 09:09:00 UTC
[jira] [Updated] (JAMES-2892) Implement level error-handling
protocol
[ https://issues.apache.org/jira/browse/JAMES-2892?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
René Cordier updated JAMES-2892:
--------------------------------
Description:
See https://jmap.io/spec-core.html#errors notes about Request-Level Errors:
When an HTTP error response is returned to the client, the server SHOULD return a JSON “problem details” object as the response body, as per [RFC7807](https://tools.ietf.org/html/rfc7807).
The following problem types are defined:
- urn:ietf:params:jmap:error:unknownCapability The client included a capability in the “using” property of the request that the server does not support.
- urn:ietf:params:jmap:error:notJSON The content type of the request was not application/json or the request did not parse as I-JSON.
- urn:ietf:params:jmap:error:notRequest The request parsed as JSON but did not match the type signature of the Request object.
- urn:ietf:params:jmap:error:limit The request was not processed as it would have exceeded one of the request limits defined on the capability object, such as maxSizeRequest, maxCallsInRequest, or maxConcurrentRequests. A “limit” property MUST also be present on the “problem details” object, containing the name of the limit being applied.
*Example*
{code:java}
{
"type": "urn:ietf:params:jmap:error:unknownCapability",
"status": 400,
"detail": "The Request object used capability
'https://example.com/apis/foobar', which is not supported
by this server."
}
{code}
*DOD*:
- Ommitting the content-type, accept header, sending non json payload, invalid json payload, or violating limits should result in the right error. You will write *memory integration tests* demonstrating these protocol errors.
was:
JMAP error handling related logic needs to be reviewed in order to match [this|https://jmap.io/spec-core.html#errors]
Test the following (protocol level) errors:
- The user is passing an unknown capability
- The user is passing a non parsable JSON
- The user did not use `application/json` content type
- The method being used does not exist
Summary: Implement level error-handling protocol (was: JMAP protocol-level error handling)
> Implement level error-handling protocol
> ---------------------------------------
>
> Key: JAMES-2892
> URL: https://issues.apache.org/jira/browse/JAMES-2892
> Project: James Server
> Issue Type: Sub-task
> Components: JMAP
> Reporter: Benoit Tellier
> Assignee: Antoine Duprat
> Priority: Major
>
> See https://jmap.io/spec-core.html#errors notes about Request-Level Errors:
> When an HTTP error response is returned to the client, the server SHOULD return a JSON “problem details” object as the response body, as per [RFC7807](https://tools.ietf.org/html/rfc7807).
> The following problem types are defined:
> - urn:ietf:params:jmap:error:unknownCapability The client included a capability in the “using” property of the request that the server does not support.
> - urn:ietf:params:jmap:error:notJSON The content type of the request was not application/json or the request did not parse as I-JSON.
> - urn:ietf:params:jmap:error:notRequest The request parsed as JSON but did not match the type signature of the Request object.
> - urn:ietf:params:jmap:error:limit The request was not processed as it would have exceeded one of the request limits defined on the capability object, such as maxSizeRequest, maxCallsInRequest, or maxConcurrentRequests. A “limit” property MUST also be present on the “problem details” object, containing the name of the limit being applied.
> *Example*
> {code:java}
> {
> "type": "urn:ietf:params:jmap:error:unknownCapability",
> "status": 400,
> "detail": "The Request object used capability
> 'https://example.com/apis/foobar', which is not supported
> by this server."
> }
> {code}
> *DOD*:
> - Ommitting the content-type, accept header, sending non json payload, invalid json payload, or violating limits should result in the right error. You will write *memory integration tests* demonstrating these protocol errors.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)
---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org