Giter Site home page Giter Site logo

masreplay / error_handler.dart Goto Github PK

View Code? Open in Web Editor NEW
20.0 20.0 1.0 2.56 MB

error handler for all http client in dart like Dio, Chopper, Http and more

Home Page: https://pub.dev/packages/error_handler

License: MIT License

Dart 100.00%
dart dio error-handling flutter freezed http requests retrofit

error_handler.dart's Introduction

Hello, My name is MAS. And i love Dart :)

error_handler.dart's People

Contributors

masreplay avatar

Stargazers

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

Watchers

 avatar  avatar  avatar

Forkers

prasant10050

error_handler.dart's Issues

nullable response in ResultState.data()

make this a valid syntax

final state = ResultState.data(data: "value");

cons:

state.user.when(
      data: (value, response) {
        // null check
        response!.statusCode;
      },
);

Can this handle Dio's Failed to parse header value

I just want to ask if this package can handle this phenomenal issue when the expected response should return 401 or Unauthorized, but instead return DioError [DioErrorType.other]: HttpException: Failed to parse header value

Any thoughts on this? Here's the issue

cfug/dio#219

StateHistory

save the previous state

void main(List<String> args) {
  const state = ResultState.idle();
  final history = state.getHistory();

  history.selectData();

  final List<Item> items = history.selectDataValues();

  print(items);
}

return list of history of the previous values

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.