https://github.com/gregwhitaker/ratpack-error
Ratpack module that provides a consistent and easy-to-use error handling framework
https://github.com/gregwhitaker/ratpack-error
error-handling microservice ratpack rest rest-api restful-webservices
Last synced: 20 days ago
JSON representation
Ratpack module that provides a consistent and easy-to-use error handling framework
- Host: GitHub
- URL: https://github.com/gregwhitaker/ratpack-error
- Owner: gregwhitaker
- License: apache-2.0
- Created: 2017-12-29T19:58:30.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2018-01-03T01:02:06.000Z (almost 8 years ago)
- Last Synced: 2025-02-25T17:41:25.355Z (8 months ago)
- Topics: error-handling, microservice, ratpack, rest, rest-api, restful-webservices
- Language: Java
- Homepage:
- Size: 84 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# ratpack-error
[](https://travis-ci.org/gregwhitaker/ratpack-error)A [Ratpack](http://www.ratpack.io) module that provides a consistent and easy-to-use error handling framework for restful web services.
The ratpack-error module provides a set of base exception classes that when extended give you beautiful, user-friendly, error messages like the following:
* Error Message Example
{
"status": 404,
"errorCode": "123ABC",
"errorMessage": "Not Found",
"errorDetail": "Foo widget with id '123' was not found",
"errorDetailUrl": "https://docs.test.com/errors/123abc"
}
* Field Level Error Message Example
{
"status": 400,
"errorCode": "321ABC",
"errorMessage": "Bad Request",
"errorDetail": "Invalid query parameters",
"fieldErrors": [
{
"field": "numPages",
"errorCode": "321ABC-456",
"errorMessage": "Parameter 'numPages' must be an integer."
}
]
}
## Getting Started
The ratpack-error module is available via [JCenter](https://bintray.com/gregwhitaker/maven/ratpack-error).## Building From Source
The module can built using the following Gradle command:$ ./gradlew clean build
## Bugs and Feedback
For bugs, questions, and discussions please use the [Github Issues](https://github.com/gregwhitaker/ratpack-error/issues).## License
Copyright 2017 Greg WhitakerLicensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License athttp://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.