buerokratt / Ruuter

Events orchestrator to define steps of business logic as YAML-based configuration files
MIT License
4 stars 13 forks source link

Add error handling to HTTP requests #198

Open RayDNoper opened 1 year ago

RayDNoper commented 1 year ago

AS A Service Manager I WANT TO specify the step to branch off to when HTTP request responds with non-OK SO THAT that request can be modified programmatically or DSL to return information about situation

get_message:
  call: http.get
  args:
    url: http://localhost:8080/guards/fail/mock-response #step that always gives 403
    query:
      var: "value"
  result: the_message
  error: error_step

return_value:
  return: ${the_message.request}

error_step:
  return: "Resource unavailable"
  status: 404
rasmusei commented 10 months ago

@turnerrainer, please check if accidentally closed.