1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45
// Copyright 2017 Telefónica Germany Next GmbH. See the COPYRIGHT file at // the top-level directory of this distribution // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. #![allow(unused_doc_comment)] //! Geeny Hub SDK Error Types //! //! These error types are generated by [Error Chain](https://docs.geeny.io/sdk/hub-sdk/error_chain). //! These types can be combined with other crates using `error_chain` in the following way: //! //! ```rust //! #[macro_use] //! extern crate error_chain; //! extern crate hub_sdk; //! //! mod your_error { //! use hub_sdk::errors; //! //! error_chain!{ //! links { //! GeenyHub(errors::Error, errors::ErrorKind); //! } //! } //! } //! //! fn main() {} //! ``` //! //! Additionally, `Error` implements the `Responder` trait from Rocket, and will produce //! a JSON return value with error code 400 if returned from a route handler in Rocket. use mvdb::errors as merr; use geeny_api::errors as gerr; // TODO DI-234 - Proper enumeration of errors error_chain!{ links { Mvdb(merr::Error, merr::ErrorKind); GeenyApi(gerr::Error, gerr::ErrorKind); } }