Skip to content
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

Handle O'Reilly 500 error while downloading chapters #21

Open
jenni opened this issue Nov 24, 2020 · 2 comments
Open

Handle O'Reilly 500 error while downloading chapters #21

jenni opened this issue Nov 24, 2020 · 2 comments
Labels
bug Something isn't working

Comments

@jenni
Copy link
Owner

jenni commented Nov 24, 2020

Handle 500 error when downloading a chapter and O'Reilly goes unavailable.

@jenni jenni added the bug Something isn't working label Nov 24, 2020
@jenni jenni changed the title Handle O'Reilly error while downloading chapters Handle O'Reilly 500 error while downloading chapters Nov 24, 2020
@claviola
Copy link

I've stumbled upon a similar issue with an image that seems to not exist:
(book ID is 9781492077206)


          ::::::::  ::: :::::::::   ::::::::   ::::::::  :::    ::: ::::::::
        :+:    :+: :+  :+:    :+: :+:    :+: :+:    :+: :+:   :+: :+:    :+:
       +:+    +:+     +:+    +:+ +:+    +:+ +:+    +:+ +:+  +:+  +:+
      +#+    +:+     +#++:++#+  +#+    +:+ +#+    +:+ +#++:++   +#++:++#++
     +#+    +#+     +#+    +#+ +#+    +#+ +#+    +#+ +#+  +#+         +#+
    #+#    #+#     #+#    #+# #+#    #+# #+#    #+# #+#   #+# #+#    #+#
    ########      #########   ########   ########  ###    ### ########

+:++:++:++:+      using stored cookies
+:++:++:++:+      downloading: Learning Go
+:++:++:++:+      22 chapters to download, this can take a while...
+:++:++:++:+      done downloading chapter: Praise for Learning Go
+:++:++:++:+      done downloading chapter: Learning Go
+:++:++:++:+      done downloading chapter: Learning Go
+:++:++:++:+      done downloading chapter: Preface
(node:1) UnhandledPromiseRejectionWarning: Error: Image loading error - 500. URL: https://learning.oreilly.com/library/view/learning-go/9781492077206/assets/lego_0103.png
    at Request._callback (/usr/app/node_modules/image-downloader/index.js:60:15)
    at Request.self.callback (/usr/app/node_modules/request/request.js:185:22)
    at Request.emit (events.js:314:20)
    at Request.<anonymous> (/usr/app/node_modules/request/request.js:1161:10)
    at Request.emit (events.js:314:20)
    at IncomingMessage.<anonymous> (/usr/app/node_modules/request/request.js:1083:12)
    at Object.onceWrapper (events.js:420:28)
    at IncomingMessage.emit (events.js:326:22)
    at endReadableNT (_stream_readable.js:1241:12)
    at processTicksAndRejections (internal/process/task_queues.js:84:21)
(node:1) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
(node:1) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

(This is using the docker image.)
is there a way to just ignore the error and continue?

@MrMauricioLeite
Copy link

MrMauricioLeite commented May 7, 2024

Just got the exact same issue using the docker.
Unsure if I'm doing something wrong or if I'm missing a flag that enables v2 api endpoint (merged in the past)




          ::::::::  ::: :::::::::   ::::::::   ::::::::  :::    ::: :::::::: 
        :+:    :+: :+  :+:    :+: :+:    :+: :+:    :+: :+:   :+: :+:    :+: 
       +:+    +:+     +:+    +:+ +:+    +:+ +:+    +:+ +:+  +:+  +:+         
      +#+    +:+     +#++:++#+  +#+    +:+ +#+    +:+ +#++:++   +#++:++#++   
     +#+    +#+     +#+    +#+ +#+    +#+ +#+    +#+ +#+  +#+         +#+    
    #+#    #+#     #+#    #+# #+#    #+# #+#    #+# #+#   #+# #+#    #+#     
    ########      #########   ########   ########  ###    ### ########       













 
+:++:++:++:+      using stored cookies
+:++:++:++:+      downloading: Essential Math for Data Science
+:++:++:++:+      17 chapters to download, this can take a while...
+:++:++:++:+      done downloading chapter: Praise for Essential Math for Data Science
+:++:++:++:+      done downloading chapter: Essential Math for Data Science
+:++:++:++:+      done downloading chapter: Essential Math for Data Science
+:++:++:++:+      done downloading chapter: Preface
(node:1) UnhandledPromiseRejectionWarning: Error: Image loading error - 500. URL: https://learning.oreilly.com/library/view/essential-math-for/9781098102920/assets/emds_0101.png
    at Request._callback (/usr/app/node_modules/image-downloader/index.js:60:15)
    at Request.self.callback (/usr/app/node_modules/request/request.js:185:22)
    at Request.emit (events.js:314:20)
    at Request.<anonymous> (/usr/app/node_modules/request/request.js:1161:10)
    at Request.emit (events.js:314:20)
    at IncomingMessage.<anonymous> (/usr/app/node_modules/request/request.js:1083:12)
    at Object.onceWrapper (events.js:420:28)
    at IncomingMessage.emit (events.js:326:22)
    at endReadableNT (_stream_readable.js:1241:12)
    at processTicksAndRejections (internal/process/task_queues.js:84:21)
(node:1) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
(node:1) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

Anything I'm missing here?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants