Custom social connection with reddit oauth: "too few args to sprintf"

I’m trying to create a custom social connection.

Here are my settings:
Name: reddit
Authorization URL:
Token URL:
Scope: identity
Fetch User Profile Script:

function(accessToken, ctx, cb) {
  request.get('', {
    headers: {
      'Authorization': 'Bearer ' + accessToken
  }, function(e, r, b) {
    if (e) return cb(e);
    if (r.statusCode !== 200) return cb(new Error('StatusCode: ' + r.statusCode));
    var profile = JSON.parse(b).data;
    profile.user_id =;
    cb(null, profile);

and no custom headers.

After I click “authorise” on reddit’s request for permission page, I get back the following error message:

  "error": "server_error",
  "error_description": "too few args to sprintf"

Observations: The fetch user profile script doesn’t run at all, reddit redirects to /login/callback with both the code and the state included in the URL as expected.