You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using the API to compile a teal contract, if there is a syntax error or something else the error returned is a generic "%d error(s)" with no hints on what it might be.
I think the discrepancy is because in the goal clerk command, ReportProblems() is explicitly called and returns the error array to stderr.
However, it seems like we do not do this for the /teal/compile/ API endpoint yet. We call assemble(), which only returns the number of errors in a program. If we could also report the error array here, I think it would save a lot of devs trouble 😅
Problem
When using the API to compile a teal contract, if there is a syntax error or something else the error returned is a generic "%d error(s)" with no hints on what it might be.
The assembler does have some list of the errors but summarizes them with a count here:
https://github.com/algorand/go-algorand/blob/master/data/transactions/logic/assembler.go#L1676-L1682
Is this done for a specific reason or could we return some string with all the error messages or at least the first N?
The text was updated successfully, but these errors were encountered: