Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • heptapod heptapod
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 201
    • Issues 201
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 1
    • Merge requests 1
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Container Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • heptapodheptapod
  • heptapodheptapod
  • Merge requests
  • !15

hg_http_controller: avoid masking some errors

  • Review changes

  • Download
  • Email patches
  • Plain diff
Closed Georges Racinet requested to merge topic/heptapod/improve-error-log into branch/heptapod Apr 03, 2019
  • Overview 5
  • Commits 1
  • Pipelines 1
  • Changes 1

In case the inner HTTParty call to hgserve didn't get to a conclusion (e.g., because of a timeout), hgserve response doesn't have its Content-Type set, and this ends up as:

ArgumentError (:type option required): app/controllers/projects/hg_http_controller.rb:79:in `hg_post'

because we try and return our own response without a proper Content-Type. In this changeset, we add a default Content-Type to avoid this masking.

If hgserve would itself have a bug leading it to incorrectly send us a response without a proper Content-Type, we would similarly not mask what happens with this ArgumentError

--HG-- branch : heptapod

Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: topic/heptapod/improve-error-log