A call can fail because a definition is missing, a document is invalid, or the database refuses a change.
The examples use the people data to show these results.
Use the status and diagnostic fields to identify the failure.
The error record gives the fields in your language. Statuses gives the failure conditions of each operation.
This record describes a failure with its status and diagnostic. The binding copies the diagnostic before it releases the native owner.
Each status names a class of failure. The table lists codes from the binding. Native diagnostic codes can differ.
Codes: time_out_of_range, invalid_argument, out_of_range, non_finite_number, cycle, unsupported_type, too_large, native_failure, live_children, wrong_kind, not_integral, inexact_number, missing_field, unknown_field, duplicate_field, too_deep, length_mismatch, malformed_tag, ambiguous_field, ambiguous_variant, invalid_value, hook_failed.
Codes: out_of_memory.
Codes: not_found.
Codes: closed.
Codes: abi_version, core_digest.
Codes: cancelled.
No core operation reports this status.
Codes: unlicensed.
The generator captured each result from the native library.
rust 41 B
let result = db. backups () . status () . err () ;
TRON226 B
Offset (hex) Bytes (hex) Meaning 00 54 52 4F 4E magic TRON 04 6C 737461747573 txt "status" 0B BC 756E617661696C
61626C65 txt "unavailable" 17 0F 0A 04000000 0B00
0000 map leaf, size 10: @4 → @B 21 6C 656E74697479 txt "entity" 28 00 nil 29 0F 0A 21000000 2800
0000 map leaf, size 10: @21 → @28 33 7C 6D657373616765 txt "message" 3B 14 19 74686520706C
7567696E20697320
6E6F7420656E6162
6C6564 txt "the plugin is not enable…" 56 0F 0A 33000000 3B00
0000 map leaf, size 10: @33 → @3B 60 07 0E 08020000 2900
0000 56000000 map branch, size 14, depth 1, slots 3, 9: @29 → @56 6E 4C 70617468 txt "path" 73 00 nil 74 0F 0A 6E000000 7300
0000 map leaf, size 10: @6E → @73 7E 5C 6669656C64 txt "field" 84 00 nil 85 0F 0A 7E000000 8400
0000 map leaf, size 10: @7E → @84 8F 4C 636F6465 txt "code" 94 BC 756E617661696C
61626C65 txt "unavailable" A0 0F 0A 8F000000 9400
0000 map leaf, size 10: @8F → @94 AA 6C 6F6666736574 txt "offset" B1 00 nil B2 0F 0A AA000000 B100
0000 map leaf, size 10: @AA → @B1 BC 07 1E 51620000 1700
0000 60000000 7400
0000 85000000 A000
0000 B2000000 map branch, size 30, depth 0 (root), slots 0, 4, 6, 9, 13, 14: @17 → @60 → @74 → @85 → @A0 → @B2
rust 134 B
let sync_options = stardust:: parse ( "{maxWait {#dur PT5S}}" , Format :: DUST ) ?;
let result = db. backups () . sync ( Some ( & sync_options)) . err () ;
TRON226 B
Offset (hex) Bytes (hex) Meaning 00 54 52 4F 4E magic TRON 04 6C 737461747573 txt "status" 0B BC 756E617661696C
61626C65 txt "unavailable" 17 0F 0A 04000000 0B00
0000 map leaf, size 10: @4 → @B 21 6C 656E74697479 txt "entity" 28 00 nil 29 0F 0A 21000000 2800
0000 map leaf, size 10: @21 → @28 33 7C 6D657373616765 txt "message" 3B 14 19 74686520706C
7567696E20697320
6E6F7420656E6162
6C6564 txt "the plugin is not enable…" 56 0F 0A 33000000 3B00
0000 map leaf, size 10: @33 → @3B 60 07 0E 08020000 2900
0000 56000000 map branch, size 14, depth 1, slots 3, 9: @29 → @56 6E 4C 70617468 txt "path" 73 00 nil 74 0F 0A 6E000000 7300
0000 map leaf, size 10: @6E → @73 7E 5C 6669656C64 txt "field" 84 00 nil 85 0F 0A 7E000000 8400
0000 map leaf, size 10: @7E → @84 8F 4C 636F6465 txt "code" 94 BC 756E617661696C
61626C65 txt "unavailable" A0 0F 0A 8F000000 9400
0000 map leaf, size 10: @8F → @94 AA 6C 6F6666736574 txt "offset" B1 00 nil B2 0F 0A AA000000 B100
0000 map leaf, size 10: @AA → @B1 BC 07 1E 51620000 1700
0000 60000000 7400
0000 85000000 A000
0000 B2000000 map branch, size 30, depth 0 (root), slots 0, 4, 6, 9, 13, 14: @17 → @60 → @74 → @85 → @A0 → @B2
edn_text holds this document:
TRON24 B
Offset (hex) Bytes (hex) Meaning 00 54 52 4F 4E magic TRON 04 BC 7B3A612031203A
6120327D txt "{:a 1 :a 2}"
rust 150 B
let edn = stardust:: parse ( edn_text, Format :: TRON ) ?;
let output = edn. read ( edn. root () ?) ?. text ;
let result = stardust:: parse ( output, Format :: EDN ) . err () ;
TRON254 B
Offset (hex) Bytes (hex) Meaning 00 54 52 4F 4E magic TRON 04 6C 737461747573 txt "status" 0B 14 10 696E76616C69
645F617267756D65
6E74 txt "invalid_argument" 1D 0F 0A 04000000 0B00
0000 map leaf, size 10: @4 → @B 27 6C 656E74697479 txt "entity" 2E 00 nil 2F 0F 0A 27000000 2E00
0000 map leaf, size 10: @27 → @2E 39 7C 6D657373616765 txt "message" 41 14 27 696E76616C69
642045444E202844
75706C6963617465
5F4B657929206174
206F666673657420
36 txt "invalid EDN (Duplicate_K…" 6A 0F 0A 39000000 4100
0000 map leaf, size 10: @39 → @41 74 07 0E 08020000 2F00
0000 6A000000 map branch, size 14, depth 1, slots 3, 9: @2F → @6A 82 4C 70617468 txt "path" 87 00 nil 88 0F 0A 82000000 8700
0000 map leaf, size 10: @82 → @87 92 5C 6669656C64 txt "field" 98 00 nil 99 0F 0A 92000000 9800
0000 map leaf, size 10: @92 → @98 A3 4C 636F6465 txt "code" A8 BC 696E76616C6964
5F65646E txt "invalid_edn" B4 0F 0A A3000000 A800
0000 map leaf, size 10: @A3 → @A8 BE 6C 6F6666736574 txt "offset" C5 02 06000000000000
00 i64 6 CE 0F 0A BE000000 C500
0000 map leaf, size 10: @BE → @C5 D8 07 1E 51620000 1D00
0000 74000000 8800
0000 99000000 B400
0000 CE000000 map branch, size 30, depth 0 (root), slots 0, 4, 6, 9, 13, 14: @1D → @74 → @88 → @99 → @B4 → @CE
patch_text holds this document:
TRON46 B
Offset (hex) Bytes (hex) Meaning 00 54 52 4F 4E magic TRON 04 6C 617574686F72 txt "author" 0B 1C 78 txt "x" 0D 0F 0A 04000000 0B00
0000 map leaf, size 10: @4 → @B 17 4C 235F7478 txt "#_tx" 1C 0F 0A 17000000 0D00
0000 map leaf, size 10: @17 → @D
rust 104 B
let patch = stardust:: parse ( patch_text, Format :: TRON ) ?;
let result = db. merge_patch ( & patch, None ) . err () ;
TRON263 B
Offset (hex) Bytes (hex) Meaning 000 54 52 4F 4E magic TRON 004 6C 737461747573 txt "status" 00B 8C 72656A65637465
64 txt "rejected" 014 0F 0A 04000000 0B00
0000 map leaf, size 10: @4 → @B 01E 6C 656E74697479 txt "entity" 025 00 nil 026 0F 0A 1E000000 2500
0000 map leaf, size 10: @1E → @25 030 7C 6D657373616765 txt "message" 038 14 37 612070617463
68206F66206F6E6C
7920235F74782069
7320726566757365
643A20235F747820
616E6E6F74617465
7320612077726974
65 txt "a patch of only #_tx is …" 071 0F 0A 30000000 3800
0000 map leaf, size 10: @30 → @38 07B 07 0E 08020000 2600
0000 71000000 map branch, size 14, depth 1, slots 3, 9: @26 → @71 089 4C 70617468 txt "path" 08E 4C 235F7478 txt "#_tx" 093 0F 0A 89000000 8E00
0000 map leaf, size 10: @89 → @8E 09D 5C 6669656C64 txt "field" 0A3 00 nil 0A4 0F 0A 9D000000 A300
0000 map leaf, size 10: @9D → @A3 0AE 4C 636F6465 txt "code" 0B3 14 10 7472616E7361
6374696F6E5F6F6E
6C79 txt "transaction_only" 0C5 0F 0A AE000000 B300
0000 map leaf, size 10: @AE → @B3 0CF 6C 6F6666736574 txt "offset" 0D6 00 nil 0D7 0F 0A CF000000 D600
0000 map leaf, size 10: @CF → @D6 0E1 07 1E 51620000 1400
0000 7B000000 9300
0000 A4000000 C500
0000 D7000000 map branch, size 30, depth 0 (root), slots 0, 4, 6, 9, 13, 14: @14 → @7B → @93 → @A4 → @C5 → @D7
future_text holds this document:
TRON145 B
Offset (hex) Bytes (hex) Meaning 00 54 52 4F 4E magic TRON 04 1C 78 txt "x" 06 02 01000000000000
00 i64 1 0F 0F 0A 04000000 0600
0000 map leaf, size 10: @4 → @6 19 4C 23757463 txt "#utc" 1E 14 14 323230302D30
312D30315430303A
30303A30305A txt "2200-01-01T00:00:00Z" 34 0F 0A 19000000 1E00
0000 map leaf, size 10: @19 → @1E 3E 14 14 737461726475
73742F636F6D6D69
747465644174 txt "stardust/committedAt" 54 0F 0A 3E000000 3400
0000 map leaf, size 10: @3E → @34 5E 4C 235F7478 txt "#_tx" 63 0F 0A 5E000000 5400
0000 map leaf, size 10: @5E → @54 6D 3C 235F64 txt "#_d" 71 0F 0A 6D000000 0F00
0000 map leaf, size 10: @6D → @F 7B 07 0E 08010000 6300
0000 71000000 map branch, size 14, depth 0 (root), slots 3, 8: @63 → @71
older_text holds this document:
TRON145 B
Offset (hex) Bytes (hex) Meaning 00 54 52 4F 4E magic TRON 04 1C 78 txt "x" 06 02 02000000000000
00 i64 2 0F 0F 0A 04000000 0600
0000 map leaf, size 10: @4 → @6 19 4C 23757463 txt "#utc" 1E 14 14 323230302D30
312D30315430303A
30303A30305A txt "2200-01-01T00:00:00Z" 34 0F 0A 19000000 1E00
0000 map leaf, size 10: @19 → @1E 3E 14 14 737461726475
73742F636F6D6D69
747465644174 txt "stardust/committedAt" 54 0F 0A 3E000000 3400
0000 map leaf, size 10: @3E → @34 5E 4C 235F7478 txt "#_tx" 63 0F 0A 5E000000 5400
0000 map leaf, size 10: @5E → @54 6D 3C 235F65 txt "#_e" 71 0F 0A 6D000000 0F00
0000 map leaf, size 10: @6D → @F 7B 07 0E 08010000 6300
0000 71000000 map branch, size 14, depth 0 (root), slots 3, 8: @63 → @71
rust 194 B
let future = stardust:: parse ( future_text, Format :: TRON ) ?;
db. merge_patch ( & future, None ) ?;
let older = stardust:: parse ( older_text, Format :: TRON ) ?;
let result = db. merge_patch ( & older, None ) . err () ;
TRON290 B
Offset (hex) Bytes (hex) Meaning 000 54 52 4F 4E magic TRON 004 6C 737461747573 txt "status" 00B 14 13 696E76616C69
645F636F6D6D6974
5F74696D65 txt "invalid_commit_time" 020 0F 0A 04000000 0B00
0000 map leaf, size 10: @4 → @B 02A 6C 656E74697479 txt "entity" 031 00 nil 032 0F 0A 2A000000 3100
0000 map leaf, size 10: @2A → @31 03C 7C 6D657373616765 txt "message" 044 14 47 737461726475
73742F636F6D6D69
747465644174206D
7573742062652073
74726963746C7920
6E65776572207468
616E20746865206C
617465737420636F
6D6D69742074696D
65 txt "stardust/committedAt mus…" 08D 0F 0A 3C000000 4400
0000 map leaf, size 10: @3C → @44 097 07 0E 08020000 3200
0000 8D000000 map branch, size 14, depth 1, slots 3, 9: @32 → @8D 0A5 4C 70617468 txt "path" 0AA 00 nil 0AB 0F 0A A5000000 AA00
0000 map leaf, size 10: @A5 → @AA 0B5 5C 6669656C64 txt "field" 0BB 00 nil 0BC 0F 0A B5000000 BB00
0000 map leaf, size 10: @B5 → @BB 0C6 4C 636F6465 txt "code" 0CB 14 13 696E76616C69
645F636F6D6D6974
5F74696D65 txt "invalid_commit_time" 0E0 0F 0A C6000000 CB00
0000 map leaf, size 10: @C6 → @CB 0EA 6C 6F6666736574 txt "offset" 0F1 00 nil 0F2 0F 0A EA000000 F100
0000 map leaf, size 10: @EA → @F1 0FC 07 1E 51620000 2000
0000 97000000 AB00
0000 BC000000 E000
0000 F2000000 map branch, size 30, depth 0 (root), slots 0, 4, 6, 9, 13, 14: @20 → @97 → @AB → @BC → @E0 → @F2
query_text holds this document:
TRON43 B
Offset (hex) Bytes (hex) Meaning 00 54 52 4F 4E magic TRON 04 2C 3F78 txt "?x" 07 0E 0D 00 0100 010000
00 04000000 array leaf, size 13, shift 0, bitmap 0001, count 1 (root): @4 14 4C 66696E64 txt "find" 19 0F 0A 14000000 0700
0000 map leaf, size 10: @14 → @7
rust 102 B
let definition = stardust:: parse ( query_text, Format :: TRON ) ?;
let result = db. query ( & definition) . err () ;
TRON231 B
Offset (hex) Bytes (hex) Meaning 00 54 52 4F 4E magic TRON 04 6C 737461747573 txt "status" 0B 14 12 696E76616C69
645F646566696E69
74696F6E txt "invalid_definition" 1F 0F 0A 04000000 0B00
0000 map leaf, size 10: @4 → @B 29 6C 656E74697479 txt "entity" 30 00 nil 31 0F 0A 29000000 3000
0000 map leaf, size 10: @29 → @30 3B 7C 6D657373616765 txt "message" 43 14 10 556E626F756E
645F566172696162
6C65 txt "Unbound_Variable" 55 0F 0A 3B000000 4300
0000 map leaf, size 10: @3B → @43 5F 07 0E 08020000 3100
0000 55000000 map branch, size 14, depth 1, slots 3, 9: @31 → @55 6D 4C 70617468 txt "path" 72 00 nil 73 0F 0A 6D000000 7200
0000 map leaf, size 10: @6D → @72 7D 5C 6669656C64 txt "field" 83 00 nil 84 0F 0A 7D000000 8300
0000 map leaf, size 10: @7D → @83 8E 4C 636F6465 txt "code" 93 14 10 756E626F756E
645F766172696162
6C65 txt "unbound_variable" A5 0F 0A 8E000000 9300
0000 map leaf, size 10: @8E → @93 AF 6C 6F6666736574 txt "offset" B6 00 nil B7 0F 0A AF000000 B600
0000 map leaf, size 10: @AF → @B6 C1 07 1E 51620000 1F00
0000 5F000000 7300
0000 84000000 A500
0000 B7000000 map branch, size 30, depth 0 (root), slots 0, 4, 6, 9, 13, 14: @1F → @5F → @73 → @84 → @A5 → @B7
rust 46 B
let result = db. query ( "people/missing" ) . err () ;
TRON237 B
Offset (hex) Bytes (hex) Meaning 00 54 52 4F 4E magic TRON 04 6C 737461747573 txt "status" 0B 9C 6E6F745F666F75
6E64 txt "not_found" 15 0F 0A 04000000 0B00
0000 map leaf, size 10: @4 → @B 1F 6C 656E74697479 txt "entity" 26 00 nil 27 0F 0A 1F000000 2600
0000 map leaf, size 10: @1F → @26 31 7C 6D657373616765 txt "message" 39 14 1A 6E6F20646566
696E6974696F6E20
6174207468697320
70617468 txt "no definition at this pa…" 55 0F 0A 31000000 3900
0000 map leaf, size 10: @31 → @39 5F 07 0E 08020000 2700
0000 55000000 map branch, size 14, depth 1, slots 3, 9: @27 → @55 6D 4C 70617468 txt "path" 72 EC 70656F706C652F
6D697373696E67 txt "people/missing" 81 0F 0A 6D000000 7200
0000 map leaf, size 10: @6D → @72 8B 5C 6669656C64 txt "field" 91 00 nil 92 0F 0A 8B000000 9100
0000 map leaf, size 10: @8B → @91 9C 4C 636F6465 txt "code" A1 9C 6E6F745F666F75
6E64 txt "not_found" AB 0F 0A 9C000000 A100
0000 map leaf, size 10: @9C → @A1 B5 6C 6F6666736574 txt "offset" BC 00 nil BD 0F 0A B5000000 BC00
0000 map leaf, size 10: @B5 → @BC C7 07 1E 51620000 1500
0000 5F000000 8100
0000 92000000 AB00
0000 BD000000 map branch, size 30, depth 0 (root), slots 0, 4, 6, 9, 13, 14: @15 → @5F → @81 → @92 → @AB → @BD
malformed holds these bytes:
text 1 B
]
rust 60 B
let result = stardust:: parse ( malformed, Format :: DUST ) . err () ;
TRON242 B
Offset (hex) Bytes (hex) Meaning 00 54 52 4F 4E magic TRON 04 6C 737461747573 txt "status" 0B 14 10 696E76616C69
645F617267756D65
6E74 txt "invalid_argument" 1D 0F 0A 04000000 0B00
0000 map leaf, size 10: @4 → @B 27 6C 656E74697479 txt "entity" 2E 00 nil 2F 0F 0A 27000000 2E00
0000 map leaf, size 10: @27 → @2E 39 7C 6D657373616765 txt "message" 41 14 1A 496E76616C69
645F53796E746178
206174206F666673
65742030 txt "Invalid_Syntax at offset…" 5D 0F 0A 39000000 4100
0000 map leaf, size 10: @39 → @41 67 07 0E 08020000 2F00
0000 5D000000 map branch, size 14, depth 1, slots 3, 9: @2F → @5D 75 4C 70617468 txt "path" 7A 00 nil 7B 0F 0A 75000000 7A00
0000 map leaf, size 10: @75 → @7A 85 5C 6669656C64 txt "field" 8B 00 nil 8C 0F 0A 85000000 8B00
0000 map leaf, size 10: @85 → @8B 96 4C 636F6465 txt "code" 9B CC 696E76616C6964
5F64757374 txt "invalid_dust" A8 0F 0A 96000000 9B00
0000 map leaf, size 10: @96 → @9B B2 6C 6F6666736574 txt "offset" B9 02 00000000000000
00 i64 0 C2 0F 0A B2000000 B900
0000 map leaf, size 10: @B2 → @B9 CC 07 1E 51620000 1D00
0000 67000000 7B00
0000 8C000000 A800
0000 C2000000 map branch, size 30, depth 0 (root), slots 0, 4, 6, 9, 13, 14: @1D → @67 → @7B → @8C → @A8 → @C2
malformed holds these bytes:
text 1 B
[
rust 60 B
let result = stardust:: parse ( malformed, Format :: DUST ) . err () ;
TRON242 B
Offset (hex) Bytes (hex) Meaning 00 54 52 4F 4E magic TRON 04 6C 737461747573 txt "status" 0B 14 10 696E76616C69
645F617267756D65
6E74 txt "invalid_argument" 1D 0F 0A 04000000 0B00
0000 map leaf, size 10: @4 → @B 27 6C 656E74697479 txt "entity" 2E 00 nil 2F 0F 0A 27000000 2E00
0000 map leaf, size 10: @27 → @2E 39 7C 6D657373616765 txt "message" 41 14 1A 556E65787065
637465645F456E64
206174206F666673
65742032 txt "Unexpected_End at offset…" 5D 0F 0A 39000000 4100
0000 map leaf, size 10: @39 → @41 67 07 0E 08020000 2F00
0000 5D000000 map branch, size 14, depth 1, slots 3, 9: @2F → @5D 75 4C 70617468 txt "path" 7A 00 nil 7B 0F 0A 75000000 7A00
0000 map leaf, size 10: @75 → @7A 85 5C 6669656C64 txt "field" 8B 00 nil 8C 0F 0A 85000000 8B00
0000 map leaf, size 10: @85 → @8B 96 4C 636F6465 txt "code" 9B CC 696E76616C6964
5F64757374 txt "invalid_dust" A8 0F 0A 96000000 9B00
0000 map leaf, size 10: @96 → @9B B2 6C 6F6666736574 txt "offset" B9 02 02000000000000
00 i64 2 C2 0F 0A B2000000 B900
0000 map leaf, size 10: @B2 → @B9 CC 07 1E 51620000 1D00
0000 67000000 7B00
0000 8C000000 A800
0000 C2000000 map branch, size 30, depth 0 (root), slots 0, 4, 6, 9, 13, 14: @1D → @67 → @7B → @8C → @A8 → @C2