Skip to content

Add error logging to bare rescue in send_req.cr #1122

@hahwul

Description

@hahwul

Description

src/deliver/send_req.cr has a bare rescue block (line 44) that silently swallows all exceptions during HTTP request delivery.

rescue
ensure
  wg.done
end

The error should be logged at debug level before being swallowed, similar to how send_elasticsearch.cr handles it in its inner rescue.

Suggested fix

rescue e
  @logger.debug "Exception during request delivery"
  @logger.debug_sub e
ensure
  wg.done
end

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions