Skip to content

Commit

Permalink
implemented new login dto
Browse files Browse the repository at this point in the history
  • Loading branch information
kickthedragon committed Sep 2, 2016
1 parent 6eaef5b commit 31c3d72
Show file tree
Hide file tree
Showing 2 changed files with 176 additions and 168 deletions.
6 changes: 3 additions & 3 deletions src/error.rs
Expand Up @@ -8,7 +8,7 @@ use std::error::Error as StdError;

use hyper::error::Error as HyperError;
use rustc_serialize::json;
use dto::FromDTOError;
use dto::{FromDTOError, ResponseDTO};

/// The result type of the API.
pub type Result<T> = StdResult<T, Error>;
Expand All @@ -25,7 +25,7 @@ pub enum Error {
/// JSON decode error.
JSONDecodeError(json::DecoderError),
/// Error Logging in
ClientError(String),
ClientError(ResponseDTO),
/// Unauthorized.
Unauthorized,
/// Internal server error.
Expand Down Expand Up @@ -81,7 +81,7 @@ impl StdError for Error {
Error::IO(ref e) => e.description(),
Error::FromDTOError(ref e) => e.description(),
Error::JSONDecodeError(ref e) => e.description(),
Error::ClientError(ref e) => e,
Error::ClientError(ref e) => &e.message,
Error::TransactionError => "Error Generating Transaction",
Error::RegistrationError => "Error Registering User",
Error::Unauthorized => "the provided token is not authorized to use the method",
Expand Down

0 comments on commit 31c3d72

Please sign in to comment.