question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Make error_message() return the message

See original GitHub issue

What is the expected behavior?

The error message will begin to come up from backends soon. IBMQ Provider needs to accommodate them.

The error message will be found in the qObjectResult in json as:

"qObjectResult": {
    <normal qObjectResult fields>
    "error": {
        "message": "Error message example",
        "code": 9999
    }
}

The error field will only appear if there is an error, so the job status should still be checked before attempting to access the "error".

This should be a simple enough matter of just digging a bit deeper into the job_response.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:6 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
jyu00commented, Oct 8, 2019

I think the provider’s work on this is done for now. Just to do a quick recap, job.error_message() will retrieve the job result, and either

  1. produce an error report if individual error message is available for each experiment
  2. give a one-line error message if individual results are not available

Some parts of the stack might not be producing error messages right now, but when they do so in the correct format, the provider will automatically pick them up.

0reactions
nonhermitiancommented, Sep 24, 2019

This should be taken off hold as it is implemented on some devices now.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to return a error message in R?
Simply include stop() inside your function/script. If you'd like an error message, include it inside stop() like so stop("This is an error ......
Read more >
Custom Error Messages in Spring REST API
Learn a different ways of handling most common Spring exceptions and returning detailed custom error messages from a Spring REST API.
Read more >
Error.prototype.message - JavaScript - MDN Web Docs
This property contains a brief description of the error if one is available or has been set. The message property combined with the...
Read more >
How to Generate Your Own Error Messages in R
Generating your own messages may sound strange, but you can actually prevent bugs in R by generating your own errors.
Read more >
JavaScript Error message Property
In JavaScript error message property is used to set or return the error message. Syntax: errorObj.message. Return Value: It returns a string ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found