Subject: [scim] Error handling in PATCH (and BULK)

From: Phil Hunt <[email-masked]>
Date: Thu, 17 Oct 2013 10:12:34 -0700

In a patch operation, there may actually be multiple sub-operations that occur to complete a patch. For example, the patch may specify that all of the current members of a group must be removed and replaced with a new set of values.

If the server has an error and only partially removes the members, what is the expected result?

1.  Treat patches as atomic and roll-back to previous state and return an error
2.  Return the partially updated group with an error message (the patch may not be completed)
3.  Return a partially updated group with all operations attempted (adds are added but deletes may not be complete)

I recognize that some implementations may find #1 to be very difficult.  However, I think passing partial results may only create bigger problems for the client.  

I notice that Bulk has some discussion on failonerror.  But I think this applies to specific SCIM operations being treated as pass/fail atomic operations each rather than allowing partial errors within a PATCH within a bulk.

Can anybody clarify the intent here?  Should we log a ticket?

Phil

@independentid
www.independentid.com
[email-masked]

---

From: Thorsten Roßner <[email-masked]>
Date: Fri, 18 Oct 2013 10:51:27 +0200

As long as the response clearly states which atomic operations failed /
have not been conducted I am also in favor of #2 or #3. I even would
prefer #3 over #2 then.

Thorsten

Am 17.10.2013 19:12, schrieb Phil Hunt:
> 3.  Return a partially updated group with all operations attempted
> (adds are added but deletes may not be complete)
>

---

From: Kelly Grizzle <[email-masked]>
Date: Fri, 18 Oct 2013 17:14:40 +0000

> I recognize that some implementations may find #1 to be very difficult.  However, I think
> passing partial results may only create bigger problems for the client.

+1.  This will make things much easier from the client perspective.

> Bulk has some discussion on failonerror.  But I think this applies to specific SCIM operations
> being treated as pass/fail atomic operations each rather than allowing partial errors within a
> PATCH within a bulk.

Correct.  The multiple error handling in Bulk deals with each operation, not within a PATCH operation.

--Kelly

From: [email-masked] [mailto:[email-masked]] On Behalf Of Thorsten Roßner
Sent: Friday, October 18, 2013 3:51 AM
To: [email-masked]
Subject: Re: [scim] Error handling in PATCH (and BULK)

As long as the response clearly states which atomic operations failed / have not been conducted I am also in favor of #2 or #3. I even would prefer #3 over #2 then.

Thorsten

---

From: Phil Hunt <[email-masked]>
Date: Fri, 18 Oct 2013 10:16:10 -0700

Just to be clear.  I am favouring #1 which is I think what Kelly is indicating correct?

Phil

@independentid
www.independentid.com
[email-masked]

On 2013-10-18, at 10:14 AM, Kelly Grizzle <[email-masked]> wrote:

> _______________________________________________
> scim mailing list
> [email-masked]
> https://www.ietf.org/mailman/listinfo/scim

---

From: Kelly Grizzle <[email-masked]>
Date: Fri, 18 Oct 2013 17:17:21 +0000

Correct.  I am +1 for #1.

From: Phil Hunt [mailto:[email-masked]]
Sent: Friday, October 18, 2013 12:16 PM
To: Kelly Grizzle
Cc: Thorsten Roßner; [email-masked]
Subject: Re: [scim] Error handling in PATCH (and BULK)

Phil

@independentid
www.independentid.com<http://www.independentid.com>
[email-masked]<mailto:[email-masked]>

--Kelly

From: [email-masked]<mailto:[email-masked]> [mailto:[email-masked]<mailto:[email-masked]>] On Behalf Of Thorsten Roßner
Sent: Friday, October 18, 2013 3:51 AM
To: [email-masked]<mailto:[email-masked]>
Subject: Re: [scim] Error handling in PATCH (and BULK)

Thorsten

_______________________________________________
scim mailing list
[email-masked]<mailto:[email-masked]>
https://www.ietf.org/mailman/listinfo/scim

---

From: Mark Diodati <[email-masked]>
Date: Fri, 18 Oct 2013 13:56:26 -0600

++1

*From:* Kelly Grizzle [mailto:[email-masked]]
*Sent:* Friday, October 18, 2013 11:17 AM
*To:* Phil Hunt
*Cc:* Thorsten Roßner; [email-masked]
*Subject:* Re: [scim] Error handling in PATCH (and BULK)

Correct.  I am +1 for #1.

*From:* Phil Hunt [mailto:[email-masked] <[email-masked]>]
*Sent:* Friday, October 18, 2013 12:16 PM
*To:* Kelly Grizzle
*Cc:* Thorsten Roßner; [email-masked]
*Subject:* Re: [scim] Error handling in PATCH (and BULK)

Just to be clear.  I am favouring #1 which is I think what Kelly is
indicating correct?

Phil

@independentid

www.independentid.com

[email-masked]

> PATCH within a bulk.

Correct.  The multiple error handling in Bulk deals with each operation,
not within a PATCH operation.

--Kelly

*From:* [email-masked] [mailto:[email-masked]] *On
Behalf Of *Thorsten
Roßner
*Sent:* Friday, October 18, 2013 3:51 AM
*To:* [email-masked]
*Subject:* Re: [scim] Error handling in PATCH (and BULK)

As long as the response clearly states which atomic operations failed /
have not been conducted I am also in favor of #2 or #3. I even would prefer
#3 over #2 then.

Thorsten

If the server has an error and only partially removes the members, what is
the expected result?

1.  Treat patches as atomic and roll-back to previous state and return an
error

2.  Return the partially updated group with an error message (the patch may
not be completed)

3.  Return a partially updated group with all operations attempted (adds
are added but deletes may not be complete)