Git Product home page Git Product logo

Comments (2)

da-kami avatar da-kami commented on July 27, 2024

Thanks for your input! We are currently revising the the BAM-Error frame and plan changing it into a Close frame that can be sent by any party at any time. This Close frame would close the substream (including a reason), thus ending the communication in cases where a message (type) cannot be understood.
The general idea of BAM-Close (currently named BAM-Error) was introduced to have a unified way to reject message on the messaging layer, independent of underlying protocols (such as SWAP).

RFC-002 is already on the specific protocol (SWAP protocol) layer, thus the error handling is defined as part of the Response object that defines the decision in the header, which can be accepted or declined. If it was declined the Response object is defined by the DeclineBody, which can specify a decline reason, i.e.

{
  "type": "RESPONSE",
  "id": 0,
  "payload": {
    "headers": {
      "decision": "declined"
    },
    "body": { 
      "reason": "...",
      "details": "..."
    }
  }
}

It might seem over-engineered at first. Before we actually only had Request and Response - and the Response defined Error-Codes that would include errors on the messaging layer. However, the Response is the answer to a Request and is defined by the underlying protocols and should not leak up to the messaging layer.
Frames are made up of type and payload - if an incoming frame defines a type that is not understood there should be specific error handling for it (detached from the Response type that defines a response for frames of type Request), thus the Error frame was introduced.

from rfcs.

da-kami avatar da-kami commented on July 27, 2024

@birnbuazn you might like that: #117

from rfcs.

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.