From f2eb23cd87cf32b8fe545178143b5f49e06a58da Mon Sep 17 00:00:00 2001 From: Rigel Kent Date: Tue, 8 Dec 2020 21:16:10 +0100 Subject: 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 --- .../+my-video-channels/my-video-channel-create.component.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'client/src/app/+my-library/+my-video-channels') diff --git a/client/src/app/+my-library/+my-video-channels/my-video-channel-create.component.ts b/client/src/app/+my-library/+my-video-channels/my-video-channel-create.component.ts index 1d0cbf246..a625493de 100644 --- a/client/src/app/+my-library/+my-video-channels/my-video-channel-create.component.ts +++ b/client/src/app/+my-library/+my-video-channels/my-video-channel-create.component.ts @@ -10,6 +10,7 @@ import { import { FormValidatorService } from '@app/shared/shared-forms' import { VideoChannelService } from '@app/shared/shared-main' import { VideoChannelCreate } from '@shared/models' +import { HttpStatusCode } from '@shared/core-utils/miscs/http-error-codes' import { MyVideoChannelEdit } from './my-video-channel-edit' @Component({ @@ -58,7 +59,7 @@ export class MyVideoChannelCreateComponent extends MyVideoChannelEdit implements }, err => { - if (err.status === 409) { + if (err.status === HttpStatusCode.CONFLICT_409) { this.error = $localize`This name already exists on this instance.` return } -- cgit v1.2.3