Skip to content

conf: Clearer error on non-api GitHub.com host name

fjahr requested to merge fjahr/congregate:null_token into master

Overview

When initially editing the conf I wasn't sure what to set src_hostname to when the source is GitHub.com, so I simply set it to https://github.com. The error I received was confusing:

    raise ConfigurationException(
gitlab_ps_utils.exceptions.ConfigurationException: Incorrect configuration found in source_token (Response - Invalid user and/or token:
null)

I needed to look into the code to figure out what was actually going on. I suggest to warn users if they want to use a host with "github.com" that doesn't have the API prefix. I also considered silently fixing the hostname for the user but I wasn't sure if this creates issues down the line. I also think this would ideally be mentioned somewhere in the docs but I wasn't sure where to put this. I am happy to consider a different solution though.

Tasks

  • Update docs - not sure where?

Acceptance Criteria

  • Existing UTs pass locally - Still working on getting the development setup running...

Merge request reports