Revert "fix: resolve all ESLint errors in backend and frontend"
Build and Push Multi-Platform Images / build-and-push (push) Successful in 19s
Build and Push Multi-Platform Images / build-and-push (push) Successful in 19s
This reverts commit 07dfd7e840.
This commit is contained in:
@@ -7,7 +7,6 @@ import { DocumentField } from '../database/entities/document-field.entity';
|
||||
import { DocumentType } from '../database/entities/document-type.entity';
|
||||
import { PaperlessService } from './paperless.service';
|
||||
import { PostprocessingService } from '../postprocessing/postprocessing.service';
|
||||
import { getErrorMessage, getResponseData } from '../common/error.util';
|
||||
|
||||
@Injectable()
|
||||
export class PaperlessProcessorService {
|
||||
@@ -50,14 +49,13 @@ export class PaperlessProcessorService {
|
||||
);
|
||||
// Postprocessing nach dem Speichern evaluieren
|
||||
await this.postprocessingService.evaluate(updatedDoc || doc);
|
||||
} catch (innerErr: unknown) {
|
||||
} catch (innerErr: any) {
|
||||
this.logger.error(
|
||||
`Fehler bei Dokument ID ${doc.id}: ${getErrorMessage(innerErr)}`,
|
||||
`Fehler bei Dokument ID ${doc.id}: ${innerErr.message}`,
|
||||
);
|
||||
const responseData = getResponseData(innerErr);
|
||||
if (responseData) {
|
||||
if (innerErr.response?.data) {
|
||||
this.logger.error(
|
||||
`Paperless API Response: ${JSON.stringify(responseData)}`,
|
||||
`Paperless API Response: ${JSON.stringify(innerErr.response.data)}`,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,7 +3,7 @@ import { ConfigService } from '@nestjs/config';
|
||||
import axios, { type AxiosInstance } from 'axios';
|
||||
import * as fs from 'fs';
|
||||
import * as path from 'path';
|
||||
import FormData from 'form-data';
|
||||
import FormData = require('form-data');
|
||||
|
||||
@Injectable()
|
||||
export class PaperlessService {
|
||||
@@ -133,8 +133,8 @@ export class PaperlessService {
|
||||
try {
|
||||
const response = await this.client.patch(`/documents/${id}/`, data);
|
||||
return response.data;
|
||||
} catch (err: unknown) {
|
||||
const body = axios.isAxiosError(err) ? err.response?.data : undefined;
|
||||
} catch (err: any) {
|
||||
const body = err?.response?.data;
|
||||
if (body) {
|
||||
this.logger.error(
|
||||
`Paperless updateDocument(${id}) Fehlerdetails: ${JSON.stringify(body)}`,
|
||||
|
||||
Reference in New Issue
Block a user