mirror of
https://github.com/n8n-io/n8n.git
synced 2025-03-05 20:50:17 -08:00
refactor(FileMaker Node): Prevent reporting to Sentry attempted loadOptions
calls without credentials (no-changelog) (#7520)
Severity is lost when wrapping the error, but there is no need to change the error type here. https://n8nio.slack.com/archives/C03MZF137FV/p1698308092989739
This commit is contained in:
parent
a277807404
commit
d8ec6eac40
|
@ -600,15 +600,7 @@ export class FileMaker implements INodeType {
|
||||||
// Get all the available topics to display them to user so that they can
|
// Get all the available topics to display them to user so that they can
|
||||||
// select them easily
|
// select them easily
|
||||||
async getLayouts(this: ILoadOptionsFunctions): Promise<INodePropertyOptions[]> {
|
async getLayouts(this: ILoadOptionsFunctions): Promise<INodePropertyOptions[]> {
|
||||||
let returnData: INodePropertyOptions[];
|
return layoutsApiRequest.call(this);
|
||||||
|
|
||||||
try {
|
|
||||||
returnData = await layoutsApiRequest.call(this);
|
|
||||||
} catch (error) {
|
|
||||||
throw new NodeOperationError(this.getNode(), error as Error);
|
|
||||||
}
|
|
||||||
|
|
||||||
return returnData;
|
|
||||||
},
|
},
|
||||||
async getResponseLayouts(this: ILoadOptionsFunctions): Promise<INodePropertyOptions[]> {
|
async getResponseLayouts(this: ILoadOptionsFunctions): Promise<INodePropertyOptions[]> {
|
||||||
const returnData: INodePropertyOptions[] = [];
|
const returnData: INodePropertyOptions[] = [];
|
||||||
|
@ -617,12 +609,8 @@ export class FileMaker implements INodeType {
|
||||||
value: '',
|
value: '',
|
||||||
});
|
});
|
||||||
|
|
||||||
let layouts;
|
const layouts = await layoutsApiRequest.call(this);
|
||||||
try {
|
|
||||||
layouts = await layoutsApiRequest.call(this);
|
|
||||||
} catch (error) {
|
|
||||||
throw new NodeOperationError(this.getNode(), error as Error);
|
|
||||||
}
|
|
||||||
for (const layout of layouts) {
|
for (const layout of layouts) {
|
||||||
returnData.push({
|
returnData.push({
|
||||||
name: layout.name,
|
name: layout.name,
|
||||||
|
@ -635,12 +623,8 @@ export class FileMaker implements INodeType {
|
||||||
async getFields(this: ILoadOptionsFunctions): Promise<INodePropertyOptions[]> {
|
async getFields(this: ILoadOptionsFunctions): Promise<INodePropertyOptions[]> {
|
||||||
const returnData: INodePropertyOptions[] = [];
|
const returnData: INodePropertyOptions[] = [];
|
||||||
|
|
||||||
let fields;
|
const fields = await getFields.call(this);
|
||||||
try {
|
|
||||||
fields = await getFields.call(this);
|
|
||||||
} catch (error) {
|
|
||||||
throw new NodeOperationError(this.getNode(), error as Error);
|
|
||||||
}
|
|
||||||
for (const field of fields) {
|
for (const field of fields) {
|
||||||
returnData.push({
|
returnData.push({
|
||||||
name: field.name,
|
name: field.name,
|
||||||
|
@ -653,12 +637,8 @@ export class FileMaker implements INodeType {
|
||||||
async getScripts(this: ILoadOptionsFunctions): Promise<INodePropertyOptions[]> {
|
async getScripts(this: ILoadOptionsFunctions): Promise<INodePropertyOptions[]> {
|
||||||
const returnData: INodePropertyOptions[] = [];
|
const returnData: INodePropertyOptions[] = [];
|
||||||
|
|
||||||
let scripts;
|
const scripts = await getScripts.call(this);
|
||||||
try {
|
|
||||||
scripts = await getScripts.call(this);
|
|
||||||
} catch (error) {
|
|
||||||
throw new NodeOperationError(this.getNode(), error as Error);
|
|
||||||
}
|
|
||||||
for (const script of scripts) {
|
for (const script of scripts) {
|
||||||
if (!script.isFolder) {
|
if (!script.isFolder) {
|
||||||
returnData.push({
|
returnData.push({
|
||||||
|
@ -673,12 +653,8 @@ export class FileMaker implements INodeType {
|
||||||
async getPortals(this: ILoadOptionsFunctions): Promise<INodePropertyOptions[]> {
|
async getPortals(this: ILoadOptionsFunctions): Promise<INodePropertyOptions[]> {
|
||||||
const returnData: INodePropertyOptions[] = [];
|
const returnData: INodePropertyOptions[] = [];
|
||||||
|
|
||||||
let portals;
|
const portals = await getPortals.call(this);
|
||||||
try {
|
|
||||||
portals = await getPortals.call(this);
|
|
||||||
} catch (error) {
|
|
||||||
throw new NodeOperationError(this.getNode(), error as Error);
|
|
||||||
}
|
|
||||||
Object.keys(portals as IDataObject).forEach((portal) => {
|
Object.keys(portals as IDataObject).forEach((portal) => {
|
||||||
returnData.push({
|
returnData.push({
|
||||||
name: portal,
|
name: portal,
|
||||||
|
|
Loading…
Reference in a new issue