end

end(payload: any, status: any, headers: dict) -> None

Terminates the currently running integration at the end of the hook in which it is called, logging a failure with the provided status. Integration output is set to the provided payload, status, and headers.

Can be used when some condition requires an integration to terminate early, or at the end of the integration to write custom values to an integration's output .

try:
    a={"item": True}
    a.item
except KeyError as e:
    end(payload=e, status=500)

Last updated

Was this helpful?