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.

@cerebral/http documentation is confusing

See original GitHub issue

Hello! I’m new to cerebral and documentation for @cerebral/http makes me so dejected.

According to doc, I can use it like this:

import {set} from 'cerebral/operators'
import {httpGet} from '@cerebral/http/operators'
import {state, props} from 'cerebral/tags'

export default [
  httpGet(`/items/${props`itemKey`}`),
  set(state`app.currentItem`, props`result`)
]

But if I do so, I’ll get the following error:

Uncaught TypeError: Cannot read property 'get' of undefined
    at Object.httpGet [as function] (httpGet.js:17)

Which says nothing to me.

So there’re two problems:

  1. Unclear error message If use http operators without adding HttpProvider
  2. Gap in documentation, since there’s no even word about I should instantiate it first in controller section.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:8 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
Guriacommented, Jun 23, 2017

Thanks for reporting. It is a very important issues on my mind. We must check docs of all modules to avoid such confusion and put prerequisites at first place. Informative error messages when operators used without required providers is also must have for every package. Cc @christianalfoni @edgesoft @henri @reflog

0reactions
christianalfonicommented, Feb 9, 2019

Housekeeping!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Cerebral FAQ | Care model, medication, cost, anxiety ...
We will support your mental wellness regardless of your insurance access. Does Cerebral provide letters of care, FMLA, and ESA documentation? Your Cerebral...
Read more >
Http - Cerebral Docs
Http. Most applications needs some sort of requests going to a server. With Cerebral you choose your favourite library and expose it as...
Read more >
Encephalopathy due to CVA - ACDIS Forums
Please bear with me, this topic is still very confusing to me with differing opinions. Since "encephalopathy" is defined as an acute condition ......
Read more >
Diagnosis of brain death - UpToDate
Brain death implies the permanent absence of cerebral and ... Variable documentation of brain death criteria was also observed in a series ...
Read more >
Clinical Documentation Guidance for ICD-10-CM/PCS - Retired
Queries should continue to be placed on the health record when unclear, ambiguous, or missing documentation is identified.
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