Big News: Socket raises $60M Series C at a $1B valuation to secure software supply chains for AI-driven development.Announcement
Sign In

@flexsolver/flexrb

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@flexsolver/flexrb

Flex Response Builder is a custom library that standardize the API response from Flex-Solver's Backend API

npmnpm
Version
1.0.1
Version published
Weekly downloads
29
93.33%
Maintainers
1
Weekly downloads
 
Created
Source

Flex. Response Builder

Flex Response Builder is a custom library that standardize the API response from Flex-Solver's Backend API

  • Ensure Response is always in the right format
  • Ensure Error is displayed properly with tracable information

Getting Started!

A successful response data should consist of the following:

            {
                status: status || 200,
                message: message || "",
                data: data || {},
                log: log || "",
            }

Let's look at it in details:

status

Status Default should always be 200 if it is requested sucessfully and 500 if it is not sucessful status!

StatusCode
OK200
Coding Error500
SQL Error409
API or Page not found404
Others..401, 406

message

Message should be toasted out with different color

StatusCode
OKGreen
ErrorRed
OthersBlue

data

Data should be in an Object, Array form

log

Log is reserved for future purposes.

Free Software, Hell Yeah!

FAQs

Package last updated on 24 May 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts