Skip to content

Commit 0aa1509

Browse files
authored
Reduce visibility of JsonReply::new (#931)
Json replies are carefully crafted to ommit potentially sensative information. Application developers may accidentally stringify implementation errors instead of using the From `ReplayableError` impl if the ctor is pub.
2 parents 6a8bf65 + 335177e commit 0aa1509

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

payjoin/src/core/receive/error.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ pub struct JsonReply {
8282

8383
impl JsonReply {
8484
/// Create a new Reply
85-
pub fn new(error_code: ErrorCode, message: impl fmt::Display) -> Self {
85+
pub(crate) fn new(error_code: ErrorCode, message: impl fmt::Display) -> Self {
8686
Self { error_code, message: message.to_string(), extra: serde_json::Map::new() }
8787
}
8888

0 commit comments

Comments
 (0)