ssbc / ssb-blob-files

3 stars 1 forks source link

localising error messages #3

Closed mmckegg closed 5 years ago

mmckegg commented 6 years ago

I would like to display the error message (with actual file size etc) in Patchwork, but the way that the error is given doesn't give access to the file size. What about adding an error code to the error node style?

var error = new Error('Some message')
error.code = 'ETOOBIG'
error.fileSize = fileSize
error.fileName = fileName
cb(error)

cc @mixmix

mixmix commented 6 years ago

yeah I think that's a great idea. You can open a PR and just merge that if you like!

I'll go add this repo to ssbc org on npm so you can publish too

mmckegg commented 6 years ago

Cool, I'll do this sometime!

stale[bot] commented 5 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.