mirror of
https://github.com/Chocobozzz/PeerTube.git
synced 2025-10-04 18:29:27 +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
|
@ -1,6 +1,7 @@
|
|||
import * as request from 'supertest'
|
||||
import { HttpStatusCode } from '../../../shared/core-utils/miscs/http-error-codes'
|
||||
|
||||
function makeActivityPubGetRequest (url: string, path: string, expectedStatus = 200) {
|
||||
function makeActivityPubGetRequest (url: string, path: string, expectedStatus = HttpStatusCode.OK_200) {
|
||||
return request(url)
|
||||
.get(path)
|
||||
.set('Accept', 'application/activity+json,text/html;q=0.9,\\*/\\*;q=0.8')
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue