cf-abacus icon indicating copy to clipboard operation
cf-abacus copied to clipboard

Dataflow checking slack error

Open KRuelY opened this issue 7 years ago • 4 comments

After discussion with @rajkiranrbala, Slack window is app specific concept. Dataflow shouldn't handle app specific concepts like checking if an error is due to out of slack submission.

Slack error should use different status code.

KRuelY avatar Aug 18 '16 18:08 KRuelY

We have created an issue in Pivotal Tracker to manage this:

https://www.pivotaltracker.com/story/show/128601797

The labels on this github issue will be updated when the story is started.

cf-gitbot avatar Aug 18 '16 18:08 cf-gitbot

We can change the error code to 400 as @rajkiranrbala suggested to avoid having different error messages for slack and conflict.

I personally don't like 400 since it suggests the client made a request that's invalid "due to malformed syntax", while 409 means that it "could not be completed due to a conflict with the current state of the resource". So in my opinion 409 is more intuitive.

hsiliev avatar Aug 19 '16 17:08 hsiliev

Another option is also to keep 409 and check if the error is not conflict instead of checking if the error is slack?

KRuelY avatar Aug 19 '16 18:08 KRuelY

@KRuelY The problem with that approach is there is no consistent 409 error messages. I have seen

{ 
'status' : 409 , 
'noretry': true, 
'nobreaker' : true 
},
{
 error: 'Duplicate document update conflict'
}

and i have seen others too. We should find all occurrences of such errors and agree upon one structure and modify the dbclients to return conflict errors in that structure.

rajkiranrbala avatar Aug 26 '16 20:08 rajkiranrbala