Skip to content

Commit 4111d7f

Browse files
committed
refactor: update error messages in ReplicateStatusCause for clarity
1 parent 9f34cb6 commit 4111d7f

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

post-compute/src/api/worker_api.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,7 @@ mod tests {
238238
ReplicateStatusCause::PostComputeWorkerAddressMissing,
239239
];
240240
let serialized = to_string(&causes).expect("Failed to serialize");
241-
let expected = r#"[{"cause":"POST_COMPUTE_INVALID_TEE_SIGNATURE","message":"Invalid TEE signature"},{"cause":"POST_COMPUTE_WORKER_ADDRESS_MISSING","message":"Worker address related environment variable is missing"}]"#;
241+
let expected = r#"[{"cause":"POST_COMPUTE_INVALID_TEE_SIGNATURE","message":"Invalid TEE signature"},{"cause":"POST_COMPUTE_WORKER_ADDRESS_MISSING","message":"Worker address not found in TEE session"}]"#;
242242
assert_eq!(serialized, expected);
243243
}
244244

post-compute/src/compute/errors.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ pub enum ReplicateStatusCause {
1212
PostComputeDropboxUploadFailed,
1313
#[error("Encryption stage failed")]
1414
PostComputeEncryptionFailed,
15-
#[error("Encryption public key related environment variable is missing")]
15+
#[error("Encryption public key not found in TEE session")]
1616
PostComputeEncryptionPublicKeyMissing,
1717
#[error("Unexpected error occurred")]
1818
PostComputeFailedUnknownIssue,
@@ -30,15 +30,15 @@ pub enum ReplicateStatusCause {
3030
PostComputeResultFileNotFound,
3131
#[error("Failed to send computed file")]
3232
PostComputeSendComputedFileFailed,
33-
#[error("Storage token related environment variable is missing")]
33+
#[error("Storage token not found in TEE session")]
3434
PostComputeStorageTokenMissing,
35-
#[error("Task ID related environment variable is missing")]
35+
#[error("Task ID not found in TEE session")]
3636
PostComputeTaskIdMissing,
37-
#[error("Tee challenge private key related environment variable is missing")]
37+
#[error("TEE challenge private key not found in TEE session")]
3838
PostComputeTeeChallengePrivateKeyMissing,
3939
#[error("Result file name too long")]
4040
PostComputeTooLongResultFileName,
41-
#[error("Worker address related environment variable is missing")]
41+
#[error("Worker address not found in TEE session")]
4242
PostComputeWorkerAddressMissing,
4343
}
4444

@@ -88,7 +88,7 @@ mod tests {
8888
},
8989
{
9090
"cause": "POST_COMPUTE_TASK_ID_MISSING",
91-
"message": "Task ID related environment variable is missing"
91+
"message": "Task ID not found in TEE session"
9292
}
9393
]);
9494
assert_eq!(serialized, expected);

0 commit comments

Comments
 (0)