Page MenuHomeSoftware Heritage

Improve error message when save code now request fails
ClosedPublic

Authored by anlambert on Nov 25 2019, 3:30 PM.

Details

Summary

This will prevent to report an origin url to save as blacklisted while the real error was
django failing to validate CSRF (for instance when no Referer header is sent in the request).

Related to T2093

Test Plan

Cypress tests have been updated to simulate error responses and their reporting.

Diff Detail

Repository
rDWAPPS Web applications
Branch
save-improve-error-message
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 9368
Build 13721: Cypress tests for swh-web diffsJenkins
Build 13720: tox-on-jenkinsJenkins
Build 13719: arc lint + arc unit

Event Timeline

vlorentz added a subscriber: vlorentz.
vlorentz added inline comments.
cypress/integration/origin-save.spec.js
16

Nitpick: rename unknownErr to unknownError for consistency

This revision is now accepted and ready to land.Nov 25 2019, 3:39 PM

Update: s/unknownErr/unknownError/