opengeospatial / ogcapi-processes

https://ogcapi.ogc.org/processes
Other
48 stars 45 forks source link

Exception message in status info ... #392

Closed pvretano closed 8 months ago

pvretano commented 9 months ago

Right now the statusInfo.yaml schema has a message key that is of type string.

I think message key should either be a string OR an object and specifically, if the job has failed, the message should be an exception.yaml object which conforms to RFC7807.

This would require that the definition of the message key be:

message:
  oneOf:
    - type:string
    - $ref: "../common-core/exception.yaml"
jerstlouis commented 9 months ago

@pvretano Could this exception object perhaps be added as a new exception property so as not to break backwards compatibility?

Also easier to deal with for a client than "string or object".

pvretano commented 9 months ago

@jerstlouis sure ... not a problem with me ... adding an exception or exceptionReport key would be fine.

fmigneault commented 9 months ago

I support @jerstlouis's proposal. The distinct exception field could provide more details about the error. We should leave the message as a generic description since it is often used in UIs as feedback to the user about the job/results. Mixing objects in there could require revisions and a lot of condition handling by existing interfaces.

pvretano commented 9 months ago

@jerstlouis @fmigneault ok. I'll update the schema to add a distinct exception member that will be an RFC7807 problem report object. Thanks for the feedback!