openfaas / nats-queue-worker

Queue-worker for OpenFaaS with NATS Streaming
https://docs.openfaas.com/reference/async/
MIT License
129 stars 59 forks source link

Feature: Return HTTP status code and other meta-data via X-Callback-Url #42

Closed alexellis closed 6 years ago

alexellis commented 6 years ago

Expected Behaviour

The HTTP status code of the function being executed and potentially any other useful meta-data should be returned to the X-Callback-Url as a HTTP Header

Current Behaviour

No context about pass/failure, but it appears if the process gives a bad HTTP code we may get an empty body.

Possible Solution

This is not a refactoring exercise, so it shouldn't restructure the code unnecessarily or make unrelated changes.

This should populate a header such as X-Status-Code: 400 or similar.

Steps to Reproduce (for bugs)

  1. Create a classic function that exits with non-zero
  2. Or create a function with of-watchdog that returns non-200

Context

Confusing user experience for failed executions

alexellis commented 6 years ago

Derek close: fixed in latest release