Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Slightly refactor context retrieval #26

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

jamietanna
Copy link
Contributor

@jamietanna jamietanna commented Nov 16, 2021

  • Refactor context handler usage
  • Log which handler has been used for context retrieval

To make this more scalable, as we add more handlers for retrieving
context, we can use a `getHandler` method that can provide the relevant
handler.

This then allows us to pass around that handler, not worrying what it
is, just that it's doing its job.
To better improve visibility of which context retrieval handler has been
used, we can add a `name` to each handler that can be logged when
retrieving.

In the case of our fallback to OpenGraph, we can log a slightly more
appropriate message.
@jamietanna jamietanna force-pushed the refactor/context-handler branch from 13bc5dc to 719ef68 Compare November 16, 2021 09:40
@jamietanna jamietanna marked this pull request as ready for review November 16, 2021 09:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant