bee icon indicating copy to clipboard operation
bee copied to clipboard

Improve input validation for BZZ Reupload

Open AuHau opened this issue 3 years ago • 6 comments

When I try to input all sort of invalid or valid-ish data, I pretty much always get 500 which seems to me a bit extreme as for most of these I would either expect 400 or 404. About 404 I did not manage to actually get that one at all, not sure when I should receive it?

Example inputs:

$ curl -X PATCH -s localhost:1633/bzz/111/

// Non existing reference
$ curl -X PATCH -s localhost:1633/bzz/1e477b015af480e387fbf5edd90f1685a30c0e3ba88eeb3871b326b816a542da/

AuHau avatar May 21 '21 05:05 AuHau

I'd rather propose using 422 http error, as the syntax and the request are in great format and understandable by the Bee, but the business-logic does not let reupload an unpinned content.

nugaon avatar May 25 '21 16:05 nugaon

related to #2026

acud avatar Aug 12 '21 14:08 acud

This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 5 days.

github-actions[bot] avatar Nov 20 '21 01:11 github-actions[bot]

This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 5 days.

github-actions[bot] avatar Jan 24 '22 01:01 github-actions[bot]

This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 5 days.

github-actions[bot] avatar Mar 26 '22 01:03 github-actions[bot]

This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 5 days.

github-actions[bot] avatar Jun 25 '22 02:06 github-actions[bot]