-
Notifications
You must be signed in to change notification settings - Fork 189
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Satellite] Cannot set property statusCode of Error which has only a getter #2755
Comments
After doing tests for Search, I think its us. |
While working on my branch for the search bar with the latest changes from master, I ran into the same issue. I fixed the cause on my end, but will need to confirm it again after I hook up everything to work from 8080 with the front end. |
Would love a fix for this, thanks @AmasiaNalbandian! |
After exploring this, I found the reason we keep getting this error. The issue is when we try to call elastic port which is http://127.0.0.1, it doesn't work. The work around for development right now is to change telescope/config/env.development Line 246 in 8a76ffb
to use http://127.0.0.1 is returning a 404 page not found error. Unfortunately, this is completely blocking search - however I'm using the workaround to work on both right now. |
I've updated the tests. I'm not sure if I should post this in Satellite or here. But, the ES Error change was in |
See my comment in your PR about normalizing this automatically in |
@humphd can you confirm this happens locally only? |
I've only seen it happen locally, but I wonder if this is what the feed-discovery service is doing when it crashes. |
Wondering if any similar crashes are still happening after the fix in Satellite |
Not sure. We can close this for now and re-open if we see it again. |
While I was testing #2753, I ran into a crash in our error handling code:
This is being caused by the following code in the search servce:
So what's happening here is that we do a call to Elasticsearch, and because there is no index built yet (I hadn't started the parser), it fails (Promise rejects). This takes us to the
catch
block in the router, and we try tocreateError()
using503
and theerr
object. This calls into this code (not ours): https://github.com/jshttp/http-errors/blob/master/index.js#L42-L105. It is trying to decorate the error with a status code property, but it fails:This causes the server to crash. This same problem will affect all of our microservices.
We should add a test to Satellite here that tries to pass an
Error
object vs. astring
as the second arg, and figure out whose bug this is: ours, elasticsearch's, or http-errors.The text was updated successfully, but these errors were encountered: