Using ueberauth_gitlab with a new user (or I'm assuming after GitLab has updated it's terms) causes the following error in lib/ueberauth/strategy/gitlab.ex:2021 in fetch_user/2:
no case clause matching: {:error, %OAuth2.Response{body: %{"message" => "403 Forbidden - You (@USERNAME) must accept the Terms of Service in order to perform this action. Please access GitLab from a web browser to accept these terms."}, headers: [{"server", "nginx"}, {"date", "Fri, 27 Mar 2020 16:40:11 GMT"}, {"content-type", "application/json"}, {"content-length", "180"}, {"cache-control", "no-cache"}, {"vary", "Origin"}, {"x-content-type-options", "nosniff"}, {"x-frame-options", "SAMEORIGIN"}, {"x-request-id", "QPr4sfby1l2"}, {"x-runtime", "0.173385"}, {"ratelimit-limit", "600"}, {"ratelimit-observed", "1"}, {"ratelimit-remaining", "599"}, {"ratelimit-reset", "1585327278"}, {"ratelimit-resettime", "Fri, 27 Mar 2020 16:41:18 GMT"}, {"gitlab-lb", "fe-01-lb-gprd"}, {"gitlab-sv", "localhost"}], status_code: 403}}
(Log anonymized)
This can be fixed, as the message from GitLab descibes, by logging into GitLab manually and accepting the terms.
And idea how to catch that and diplay a helpful message to the user, rather than a 500 error?
Using ueberauth_gitlab with a new user (or I'm assuming after GitLab has updated it's terms) causes the following error in
lib/ueberauth/strategy/gitlab.ex:2021
infetch_user/2
:(Log anonymized)
This can be fixed, as the message from GitLab descibes, by logging into GitLab manually and accepting the terms.
And idea how to catch that and diplay a helpful message to the user, rather than a 500 error?