Open coderbyheart opened 6 years ago
Yes, good idea. The API could respond with an error code like you say.
Note: currently our implementation sends a 404 if it fails to DELETE an action request, but we could try to be more specific https://github.com/mozilla-iot/gateway/blob/master/src/controllers/actions_controller.js#L88
It may be that an action cannot be canceled since it might be already "in flight" or the Thing is otherwise unable to cancel the action (e.g. because it currently does not have enough resources).
In that case the Thing should be allowed to return the appropriate error code, which would be either
403 Forbidden
or503 Service Unavailable
.