mirror of
https://github.com/Chocobozzz/PeerTube.git
synced 2025-10-05 02:39:33 +02:00
emit more specific status codes on video upload (#3423)
- reduce http status codes list to potentially useful codes - convert more codes to typed ones - factorize html generator for error responses
This commit is contained in:
parent
c977fd3ec9
commit
f2eb23cd87
53 changed files with 506 additions and 310 deletions
|
@ -11,6 +11,7 @@ import {
|
|||
setAccessTokensToServers,
|
||||
uploadVideo
|
||||
} from '../../../../shared/extra-utils'
|
||||
import { HttpStatusCode } from '../../../../shared/core-utils/miscs/http-error-codes'
|
||||
|
||||
const expect = chai.expect
|
||||
|
||||
|
@ -53,7 +54,7 @@ describe('Test activitypub', function () {
|
|||
})
|
||||
|
||||
it('Should redirect to the origin video object', async function () {
|
||||
const res = await makeActivityPubGetRequest(servers[1].url, '/videos/watch/' + videoUUID, 302)
|
||||
const res = await makeActivityPubGetRequest(servers[1].url, '/videos/watch/' + videoUUID, HttpStatusCode.FOUND_302)
|
||||
|
||||
expect(res.header.location).to.equal('http://localhost:' + servers[0].port + '/videos/watch/' + videoUUID)
|
||||
})
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue