Skip to content
This repository was archived by the owner on Feb 14, 2019. It is now read-only.
This repository was archived by the owner on Feb 14, 2019. It is now read-only.

Trigger function error parsing github API response #25

@rclark

Description

@rclark

A very rare occurrence, from the trigger function's logs:

2017-10-05T20:35:40.161Z	bfa880b4-aa0c-11e7-b661-3b257937c083
{
    "errorMessage": "Unexpected token < in JSON at position 0 in \"https://api.github.com/app\": \n<!DOCTYPE html>\n<html>\n  <head>\n    <meta http-equiv=\"Content-type\" content=\"...",
    "errorType": "ParseError",
    "stackTrace": [
        "<!DOCTYPE html>",
        "<html>",
        "  <head>",
        "    <meta http-equiv=\"Content-type\" content=\"...",
        "stream.catch.then.e (/var/task/node_modules/got/index.js:118:14)",
        "process._tickDomainCallback (internal/process/next_tick.js:135:7)"
    ]
}

The error occurred somewhere in this bit of code, which involves getting a github token, and then checking for buildspec.yml and/or .stork.json in the repository.

Next steps

  • why does this stack trace suck so hard?
  • where can we catch this parse error so we can either surface the github api error or retry the request?

cc @kellyoung

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions