What are the limitations of custom errors in Solidity?

Question

Grade: Education Subject: Support
What are the limitations of custom errors in Solidity?
Asked by:
54 Viewed 54 Answers

Answer (54)

Best Answer
(338)
Custom errors are only available from Solidity 0.8.4 and later. Also, while they are more gas-efficient than revert strings, they still consume some gas when triggered. They are also not directly human-readable on the blockchain; you need to decode the error ID to understand the error message. Error data is limited to 32-byte values.