Skip to content

orourkedd/simple-protocol

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

What is simple protocol?

Simple protocol is simple:

  1. Never intentionally throw exceptions.
  2. Return a valid JSON object like this for a success:
{
  success: true,
  payload: {
    // the result of the operation, i.e. an http response body
  }
}
  1. Return a valid JSON object like this for an error:
{
  success: false,
  error: {
    // error details or object
  }
}

That's it! Both success and error cases are handled the same way and can follow the same code path.

About

Simple protocol helpers

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published