An update will be applied today, Nov30th, between 12PM and 1:00PM EST (UTC -5:00). The site may be slow during that time.

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
.pointer("/message")
.or_else(|| value.pointer("/error"))
.and_then(|s| s.as_str())
.unwrap_or_else(|| "unknown error");
......
Markdown is supported
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