hirosystems/stacks.js

Improve Error Messages around Fee Estimation

cipherzzz opened this issue · 2 comments

Problem

I attempted to deploy a contract and received the following message:

Error estimating transaction fee. Response 400: Bad Request. Attempted to fetch http://localhost:3999/v2/fees/transaction and failed with the message: ""

Solution

It would be great for the API to send a better description than an empty string

Underlying Issue

The actual issue was that my contract name was too long

thanks for the contribution! though im not sure how much sense it makes to couple the estimateTransaction call with too much information about contract payloads, cc @janniks

reference:

export async function estimateTransaction(

Hmm, yeah we should give better error messages. I'll check if the API is returning actual information.