optakt / flow-dps

Flow Data Provisioning Service
Apache License 2.0
29 stars 13 forks source link

Rosetta: HashPayload and decodeTransaction errors #394

Closed Maelkum closed 3 years ago

Maelkum commented 3 years ago

HashPayload Transactor method can return a number of different errors - e.g. when decoding a transaction (InvalidPayload), validating a block/account (InvalidBlock, UnknownBlock etc).

In api/rosetta/payloads.go we should differentiate between those errors instead of returning internal error for everything (configuration.ErrorInternal).

Similar should be done for other callers of decodeTransaction - we not currently checking for InvalidPayload errors in general.

awfm9 commented 3 years ago

This is covered by the #402.