chore: eslint add sonar (#17989)
This commit is contained in:
parent
8f9cbe1c49
commit
d80f4c7d3b
38 changed files with 157 additions and 180 deletions
|
|
@ -34,7 +34,7 @@ export type ResponseError = {
|
|||
const afterResponseErrorCode = (otherOptions: IOtherOptions): AfterResponseHook => {
|
||||
return async (_request, _options, response) => {
|
||||
const clonedResponse = response.clone()
|
||||
if (!/^(2|3)\d{2}$/.test(String(clonedResponse.status))) {
|
||||
if (!/^([23])\d{2}$/.test(String(clonedResponse.status))) {
|
||||
const bodyJson = clonedResponse.json() as Promise<ResponseError>
|
||||
switch (clonedResponse.status) {
|
||||
case 403:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue