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

Add introduction to readme #3

Merged
merged 4 commits into from
Aug 2, 2019
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 13 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,21 @@
# Hipo DRF Exceptions
[![hipo](https://img.shields.io/badge/hipo-red.svg)](https://hipolabs.com) [![Build Status](https://travis-ci.org/Hipo/hipo-drf-exceptions.svg?branch=master)](https://travis-ci.org/Hipo/hipo-drf-exceptions) [![pypi](https://img.shields.io/pypi/v/hipo-drf-exceptions.svg)](https://pypi.org/project/hipo-drf-exceptions/)


A [Django](https://www.djangoproject.com) app for returning consistent, verbose and easy to parse error messages on [Django Rest Framework](https://www.django-rest-framework.org/) backends.

Parsing error messages generated by DRF is a bit of pain for client developers. They need to try-catch different possible error formats. When you add errors raised at the business logic level, the error parsing becomes even more difficult.

This package unifies the output format of DRF, in "Hipo" protocol.
yigitguler marked this conversation as resolved.
Show resolved Hide resolved

####No more "An error occured." errors.

This package also provides the "fallback message", a text string that always contains a human readeable error summary. This way, client developers can always fallback to this messagge and show this message when the client receives an error that is not handeled.
yigitguler marked this conversation as resolved.
Show resolved Hide resolved

> Sounds cool! Can client devs just use this field all the time?

In our past experience, we noticed that some _lazy_ client developers tend to use this message and avoid writing any code to parse the error bundle. However, the message in this field is automatically generated and not always in an excellent literature format. In order to make clear that this is a *fallback* message, we named this field "fallback_message"
yigitguler marked this conversation as resolved.
Show resolved Hide resolved


## Table of Contents

- [Installation](#installation)
Expand Down