Commit 5f36535a authored by Brad King's avatar Brad King 💬
Browse files

error: Look for 'error' field in Gitlab error objects

Some errors from Gitlab put the message in an `error` member
instead of `message`.
parent 138b799b
......@@ -42,6 +42,7 @@ impl Error {
pub fn from_gitlab(value: Value) -> Self {
let msg = value
.or_else(|| value.pointer("/error"))
.and_then(|s| s.as_str())
.unwrap_or_else(|| "unknown error");
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment