Skip to content

Commit

Permalink
Set task name to custom context with reporting a task not found in th…
Browse files Browse the repository at this point in the history
…e aws adapter.
  • Loading branch information
bjsvedin committed Apr 24, 2024
1 parent 96f9b0e commit 54e9c4b
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -334,7 +334,7 @@ abstract class AwsAdapter : RequestStreamHandler, Resource {
return coroutineScope {
@Suppress("UNCHECKED_CAST") val task = Tasks.tasks[event.taskName] as Task<Any?>?
if (task == null) {
exceptionSettings().report(AwsTaskInvokeException("Task ${event.taskName} not found"))
exceptionSettings().report(AwsTaskInvokeException("Task ${event.taskName} not found"), event.taskName)
logger.error("Task ${event.taskName} not found")
APIGatewayV2HTTPResponse(statusCode = 404, body = "Task ${event.taskName} not found")
} else try {
Expand Down

0 comments on commit 54e9c4b

Please sign in to comment.