Skip to content

Better deploy error #328

@mixmix

Description

@mixmix

Problem

I go to deploy a program and get this error

Error: programs.ProgramAlreadySet: Program already set at hash.
    at file:///home/projects/ENTROPY/sdk/dist/index.js:61:20
    at file:///home/projects/ENTROPY/sdk/node_modules/@polkadot/api/promise/decorateMethod.js:56:28
    at file:///home/projects/ENTROPY/sdk/node_modules/@polkadot/util/nextTick.js:13:13

This is happening because someone already deployed the program. This is all well and good, but now I cannot use the program, because I have zero idea what the programPointer is 💀

Proposal

few options:

  1. don't error, just give me the pointer
    That the program is already deployed already is not relevant to me. I just want the pointer please. Get out of my way and let me continue with my work

  2. error, but attach the pointer
    The advantage of this one is that with an error there is the possibility of putting control logic in (you could still ignore the error if you wanted... but you'd have the thing you need still)

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingenhancementNew feature or requesthousekeepinglets keep the house in order

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions