chore: return 422 on slack step not found (#4810)
# What this PR does Return 422 instead of 500 when the handler for the slack incoming event was not found to gracefully omit events on call not subscribed to.
This commit is contained in:
parent
503939783f
commit
b3119e5266
1 changed files with 2 additions and 2 deletions
|
|
@ -433,8 +433,8 @@ class SlackEventApiEndpointView(APIView):
|
|||
step_was_found = True
|
||||
|
||||
if not step_was_found:
|
||||
raise Exception("Step is undefined" + str(payload))
|
||||
|
||||
logger.warning("SlackEventApiEndpointView: Step is undefined" + str(payload))
|
||||
return Response(status=422)
|
||||
return Response(status=200)
|
||||
|
||||
@staticmethod
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue