File tree Expand file tree Collapse file tree 2 files changed +7
-2
lines changed
webviews/apps/plus/patchDetails/components Expand file tree Collapse file tree 2 files changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -82,6 +82,11 @@ export class DraftService implements Disposable {
8282 } satisfies CreateDraftRequest ) ,
8383 } ) ;
8484
85+ if ( ! createDraftRsp . ok ) {
86+ const json = ( await createDraftRsp . json ( ) ) as { error ?: { message ?: string } } | undefined ;
87+ throw new Error ( json ?. error ?. message ?? createDraftRsp . statusText ) ;
88+ }
89+
8590 const createDraft = ( ( await createDraftRsp . json ( ) ) as DraftResult ) . data ;
8691 const draftId = createDraft . id ;
8792
Original file line number Diff line number Diff line change @@ -118,12 +118,12 @@ export class GlPatchCreate extends GlTreeBase<GlPatchCreateEvents> {
118118 </ div > ` ,
119119 ) }
120120 < div class ="message-input ">
121- < input id ="title " type ="text " class ="message-input__control " placeholder ="Title (required) " .value =${
121+ < input id ="title " type ="text " class ="message-input__control " placeholder ="Title (required) " maxlength =" 100 " .value =${
122122 this . create . title ?? ''
123123 } @input =${ this . onTitleInput } > </ textarea >
124124 </ div >
125125 < div class ="message-input ">
126- < textarea id ="desc " class ="message-input__control " placeholder ="Description (optional) " .value =${
126+ < textarea id ="desc " class ="message-input__control " placeholder ="Description (optional) " maxlength =" 10000 " .value =${
127127 this . create . description ?? ''
128128 } @input =${ this . onDescriptionInput } > </ textarea >
129129 </ div >
You can’t perform that action at this time.
0 commit comments