Giter Site home page Giter Site logo

Comments (8)

kytrinyx avatar kytrinyx commented on July 16, 2024

What does exercism debug output?

from go.

davidsulpy avatar davidsulpy commented on July 16, 2024

It turns out I had not yet set my api key. It would be nice if the error message had showed me that it was an issue because I had no api key set. Once I ran exercism configure --key=KEY and then ran exercism fetch go leap everything worked just fine. If I'd followed the directions better I wouldn't've run into this issue, but at least it's still a potentially valid user experience issue.

Thanks for the quick response though!

Also, just for the sake of completion, here was the exercism debug output prior to me setting my key:

**** Debug Information ****
Exercism CLI Version: 2.2.1
Exercism CLI Latest Release: 2.2.1
OS/Architecture: darwin/amd64
Build OS/Architecture /
Home Dir: /Users/davidsulpy
Config file: <not configured>
API Key: <not configured>
API: http://exercism.io [connected]
XAPI: http://x.exercism.io [connected]
Exercises Directory: /Users/davidsulpy/exercism

If you are having trouble and need to file a GitHub issue (https://github.com/exercism/exercism.io/issues) please include this information (except your API key. Keep that private).

from go.

kytrinyx avatar kytrinyx commented on July 16, 2024

It turns out I had not yet set my api key.

Aaah, yes we should absolutely give you a good error message for that!

/cc @exercism/cli-committers should we check this at the CLI level, or should the API take care of it and provide a better error message?

from go.

Tonkpils avatar Tonkpils commented on July 16, 2024

@kytrinyx I may lean towards checking this at both the CLI and the API level, but if not, the API definitely needs to at least handle returning error responses as JSON. We could also make the error messages on unmarshal better. The user doesn't really care about the JSON being unable to be parsed. It's simply an error on our end and to provide the debug info as an issue. Thoughts?

from go.

kytrinyx avatar kytrinyx commented on July 16, 2024

I may lean towards checking this at both the CLI and the API level

Agreed.

API definitely needs to at least handle returning error responses as JSON

Yeah, definitely.

We could also make the error messages on unmarshal better.

Yeah, let's do that, as well.

It's simply an error on our end and to provide the debug info as an issue.

You mean add the output on STDERR but as "extra information" that can be submitted in an issue, if they care to?

from go.

lcowell avatar lcowell commented on July 16, 2024

I'm thinking it's best to let the api provide us with an error rather than enforcing it at the cli interface. The cli's job is to send up whatever it can, it's the server's job to decide if that good enough.

I think about the discussion here exercism/exercism#2607 and the possibility of an anonymous fetch from the cli. We don't really need an api_key to do a fetch and it would mean we only have to make a change in one place if we want to change the rules.

Not needing an api key could be a way of removing barriers to trying exercism out.

from go.

kytrinyx avatar kytrinyx commented on July 16, 2024

Oh, right, I forgot about the anonymous fetch thing. That's a better rule in any case.

We still need to make sure the API always sends JSON, not sure how the HTML slipped in there. I'll take a look at this tomorrow.

from go.

kytrinyx avatar kytrinyx commented on July 16, 2024

I'm deploying a fix for this right now.

from go.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.