RE: Schema.org proposal for failed actions

On 26 Okt 2014 at 02:01, ☮ elf Pavlik ☮ wrote:
> On 10/20/2014 06:27 PM, Vicki Tardif Holland wrote:
>> 
>> On Mon, Oct 20, 2014 at 11:33 AM, ☮ elf Pavlik ☮
>> <perpetual-tripper@wwelves.org <mailto:perpetual-tripper@wwelves.org>>
>> wrote:
>> 
>>     does it only cover actions which use target (EntryPoint) and have errors
>>     'on a wire'?
>>     
>>     for example CookAction could fail if I burn potatoes, would this also
>>     fit as an error?
>> 
>> The original intent is the former.
> Maybe we could re-use hydra:Error ?
> http://www.hydra-cg.com/spec/latest/core/#description-of-http-status-code
> s-and-errors

Yep, that should work.


> It focuses on HTTP errors and most likely doesn't take into account
> android-app: etc.

Right. But nothing prevents us to add a couple of properties that allow to express failures in other systems/protocols.


> I also wonder why exactly do we need special error property and can't
> just use *result*? It makes sense to me to see Error as a result of
> Failed.. Action

Good question. The only case I can think of where a separate "error" property is needed is if we want to support actions whose result is an Error instance *on success* (something like RecordErrorAction).


> {
>   "@type": "ViewAction",
>   "actionStatus": "FailedActionStatus",
>   "target": "http://example.com/player?id=123"
>   "result": {
>     "@type": "Error",
>     "statusCode": 429
>     "name": "Too Many Requests"
>     "description": "A maximum of 500 requests per hour and user is allowed."
>   }
> }



--
Markus Lanthaler
@markuslanthaler

Received on Monday, 27 October 2014 13:47:05 UTC