Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Proper error message sent from backend to client #88

Open
mittalyashu opened this issue Sep 10, 2020 · 0 comments
Open

Proper error message sent from backend to client #88

mittalyashu opened this issue Sep 10, 2020 · 0 comments
Labels
area:backend help wanted Extra attention is needed

Comments

@mittalyashu
Copy link
Member

mittalyashu commented Sep 10, 2020

Store all types of error message in json format and send the response back based on the error type.

For example

module.exports = {
	SERVER_ERROR: {
		message: "Server error",
		statusCode: 500
	},
        USER_NOT_FOUND: {
		message: "User not found",
		statusCode: 404
        }
};

If you have suggestions for error messages based on the routes and controller we're using, please share them in comments below.

Link to errorResponse.json file.

@mittalyashu mittalyashu added good first issue Good for newcomers area:backend help wanted Extra attention is needed and removed good first issue Good for newcomers labels Sep 10, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:backend help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

1 participant