Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion rts/motoko-rts/src/idl.rs
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,9 @@ unsafe fn parse_idl_header<M: Memory>(
main_types_out: *mut *mut u8,
) {
if (*buf).ptr == (*buf).end {
idl_trap_with("empty input");
idl_trap_with(
"empty input. Expected Candid-encoded argument, but received a zero-length argument",
);
}

// Magic bytes (DIDL)
Expand Down
2 changes: 1 addition & 1 deletion test/run-drun/ok/issue-1847.drun-run.ok
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
ingress Completed: Reply: 0x4449444c016c01b3c4b1f204680100010a00000000000000000101
ingress Err: IC0503: Canister rwlgt-iiaaa-aaaaa-aaaaa-cai trapped explicitly: IDL error: empty input
ingress Err: IC0503: Canister rwlgt-iiaaa-aaaaa-aaaaa-cai trapped explicitly: IDL error: empty input. Expected Candid-encoded argument, but received a zero-length argument
2 changes: 1 addition & 1 deletion test/run-drun/ok/issue-1847.ic-ref-run.ok
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
→ update create_canister(record {dnczaeh = null})
← replied: (record {hymijyo = principal "cvccv-qqaaq-aaaaa-aaaaa-c"})
→ update install_code(record {arg = blob ""; kca_xin = blob "\00asm\01\00\00\00\0…
← rejected (RC_CANISTER_ERROR): Initialization trapped: EvalTrapError region:0xXXX-0xXXX "canister trapped explicitly: IDL error: empty input"
← rejected (RC_CANISTER_ERROR): Initialization trapped: EvalTrapError region:0xXXX-0xXXX "canister trapped explicitly: IDL error: empty input. Expected Candid-encoded argument, but received a zero-length argument"