client/data-bridge/src/data-access/ApiPageEditPermissionErrorsRepository.ts
Function apiErrorToPermissionError
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private apiErrorToPermissionError( error: ApiError, semiProtectedLevels: readonly string[] ): PermissionError {
assertIsApiErrorRawErrorformat( error );
switch ( error.code ) {
case 'protectedpage': {
const right = error.params[ 0 ] as string;
Function getPermissionErrors
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public async getPermissionErrors( title: string ): Promise<PermissionError[]> {
const response = await this.api.get( {
action: 'query',
titles: new Set( [ title ] ),
prop: new Set( [ 'info' ] ),