Skip to content

Commit aafcdc8

Browse files
authored
fix: Print full error in forc-publish (#7173)
## Description ## Checklist - [ ] I have linked to any relevant issues. - [ ] I have commented my code, particularly in hard-to-understand areas. - [ ] I have updated the documentation where relevant (API docs, the reference, and the Sway book). - [ ] If my change requires substantial documentation changes, I have [requested support from the DevRel team](https://github.com/FuelLabs/devrel-requests/issues/new/choose) - [ ] I have added tests that prove my fix is effective or that my feature works. - [ ] I have added (or requested a maintainer to add) the necessary `Breaking*` or `New Feature` labels where relevant. - [ ] I have done my best to ensure that my PR adheres to [the Fuel Labs Code Review Standards](https://github.com/FuelLabs/rfcs/blob/master/text/code-standards/external-contributors.md). - [ ] I have requested a review from the relevant team or maintainers.
1 parent 1fb61fd commit aafcdc8

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

forc-plugins/forc-publish/src/error.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,9 @@ impl Error {
4444
status,
4545
error: parsed_error.error,
4646
},
47-
Err(_) => Error::ApiResponseError {
47+
Err(err) => Error::ApiResponseError {
4848
status,
49-
error: "Unknown API error".to_string(),
49+
error: format!("Unexpected API error: {}", err),
5050
},
5151
}
5252
}
@@ -118,7 +118,7 @@ mod test {
118118
match error {
119119
Error::ApiResponseError { status, error } => {
120120
assert_eq!(status, StatusCode::INTERNAL_SERVER_ERROR);
121-
assert_eq!(error, "Unknown API error");
121+
assert_eq!(error, "Unexpected API error: error decoding response body");
122122
}
123123
_ => panic!("Expected ApiResponseError"),
124124
}

0 commit comments

Comments
 (0)