GithubHelp home page GithubHelp logo

External tool not found about canvas-api HOT 2 OPEN

kstateome avatar kstateome commented on May 27, 2024
External tool not found

from canvas-api.

Comments (2)

ToeBee avatar ToeBee commented on May 27, 2024 1

Yeah, the use of Optional for single object returns was questionable. Our team was pretty new to Java 8 and I'm not sure we did the right thing here. If you request an object that doesn't exist in Canvas, that is an error state that the calling application probably needs to know about. An exception allows you to pass back more details about the error so that the calling application might be able to handle it in some way. Just returning an empty Optional kind of leaves you hanging as to what actually happened. Doesn't exist? Not authorized to view as current user? Network problem?

I'm kind of tempted to remove it but of course that would break everything.

from canvas-api.

buckett avatar buckett commented on May 27, 2024

A side note on this is that when the tool doesn't exist you also get logging warnings:

2019-11-14 15:50:55.440 ERROR 44831 --- [           main] edu.ksu.canvas.net.SimpleRestClient      : Object not found in Canvas. Requested URL: https://instance.instructure.com/api/v1/accounts/1/external_tools/789
2019-11-14 15:50:55.443 ERROR 44831 --- [           main] edu.ksu.canvas.net.SimpleRestClient      : Body of error response from Canvas: {"errors":[{"message":"The specified resource does not exist."}]}

from canvas-api.

Related Issues (13)

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.