Giter VIP home page Giter VIP logo

ju-shared's People

Contributors

andreybs11 avatar canamo06 avatar jpgarbanzo avatar kevter avatar klam avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Forkers

jpgarbanzo

ju-shared's Issues

Error logger won't properly provide context when the Error object isn't the first argument

If you look at the current error logger function it adds the error context depending on whether an Error object is provided as the first argument or not.

If the Error object isn't the first argument, a more generic stack trace will be generated and, more importantly, the context sent to the server will skip the original error message, as JSON.stringify(Error) won't work; and the common case is to log errors like Logger.error('Something custom failed', errorThrown, moreDetails...)

We should get the proper error stack regardless of the position of the error argument

Wrap jQuery's methods exposed by $.ajax handler

Since merging a pull request to expose the $.ajax handler (#11) we're allowing the developers to add code that's tightly coupled with jQuery's API.

We should wrap this object with BaseProxy's methods in order to avoid such dependency.

Navigator online status is not reliable

Today I found a situation where my wifi chipset and the browser where "unreachable", ending in a situation where the window.navigator.onLine always return false. This means a user may think there is no connection BUT it does.

ENVIRONMENT
Macbook Pro 2015
Chrome Version 64.0.3282.140

Remove redundant callback wrapper from ajax handler hook

The callback beforeMakingAjaxRequest in the code below simply does what the code in the else executes. I'd like to remove the callback in order for the hook to be able to do more useful processing without having the side effect of executing the ajax callback.

if ('function' === typeof this.opts.beforeMakingAjaxRequest) {
    var performAjaxRequestCallback = $.proxy($.ajax, $);
    return this.opts.beforeMakingAjaxRequest(performAjaxRequestCallback, params);
} else {
    // if no hook is provided, performs the request
    return $.ajax(params);
}

Improvements to logger

We need to add more information to the logger so we get useful data.
Adding the stack trace when there is an error would be a great start.

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.