Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Is there an option to get more information from the API after an on demand report has failed?
Would like to see a functional or technical error message. i.e. No data found for filter combination. Or some other message other than just status = "failed"
We are using:
POST https://help.qlik.com/en-US/nprinting/May2021/APIs/NP+API/index.html?page=40
GET https://help.qlik.com/en-US/nprinting/May2021/APIs/NP+API/index.html?page=42
Hi,
You can use Audit Trail APIs. For example export the audit table as a JSON CSV file https://help.qlik.com/en-US/nprinting/May2021/APIs/NP+API/index.html?page=11, parse it and retrieve the error messages.
Best Regards,
Ruggero
Hi @Frank_S ,
I think this could be something like a new feature request, an improvement, to be proposed in https://community.qlik.com/t5/Labels-page/bd-p/Category_Labels?categoryId=qlik-ideas&corenode=boards.... It is not possible for a user to customize the error messages and I don't know if this specific error can be captured when it happens in order to display a more specific message. This need to be evaluated by the developers team.
Best Regards,
Ruggero
I am not sure if i understand..
since you are using ondemand request data combination should be determined by user selections and results hence you dont need such response from nprinting as you can get one directly from qlik sense either through visualisation or api
Hi,
You can use Audit Trail APIs. For example export the audit table as a JSON CSV file https://help.qlik.com/en-US/nprinting/May2021/APIs/NP+API/index.html?page=11, parse it and retrieve the error messages.
Best Regards,
Ruggero
Hi Ruggero,
I have looked at the results of the audit trail. Both event and logs are not logging tomething about the error if a On-Demand-Request has failed.
This is the only thing i get from a event request
2022-01-07T14:17:31.726726879Z OnDemandRequest.Failed OnDemandRequest 24ac0319-2e42-4ec5-883e-19a2366c4b28 Vslg Goederenbeweging per artikel (per uitgever) Failed 552589af-e68b-43d3-9b2b-bfceceec4768 On-demand request '24ac0319-2e42-4ec5-883e-19a2366c4b28' failed for report 'Vslg Goederenbeweging per artikel (per uitgever)' {"format": "XLSX", "reportId": "813e00fc-b8e2-4b19-b00d-579cddcfbc3e", "reportTitle": "Vslg Goederenbeweging per artikel (per uitgever)", "requestSourceType": "OnDemand"} OnDemandRequest
There should be a way to detmine what went wrong !?
I hope you can help me.
Regards
Marcel
The error/failure is 'after' sending the API call.
In this case you would want to investigate what the issue with the On Demand report is.
The fact that the report failed based on your API call indicates a possible issue with perhaps the report design, possible locked fields (always one selected or other unsupported QS item) or other filter problem.
Try executing the report directly via the QS hub with the same parameters used in your API call.
Here is one article that might help...
I agree with Frank,
This error usually indicates issues with report itself and "Always one selected value" is usually a reason. We keep forgetting about fields which are hidden and set to always one selected values: like toggles, selectors etc...
Thanks Frank and Lech.
Indeed the error is after the on demand request api call. The most common reason why there is a failure of the report is because the user gave a selection (period of time) where there are no facts.
In that case I want to give the user a functional message i.e. "The selection does not provides any data" or give the user an empty report. But now the user is calling telling that his report failed.
regards,
Marcel
Hi @mbrouwer
If it is a 'request failed' message then check the article I sent.
Here it is again for your convenience.
If there is a different error, then that might require a remote session.
Request failed could also be due to unsupported items as well so you should also check your QVF.
@Ruggero_Piccoli I don't believe custom messages are possible that @mbrouwer is suggesting correct? Do you have any thoughts about his question? Thx in advance.
Hi @Frank_S ,
I think this could be something like a new feature request, an improvement, to be proposed in https://community.qlik.com/t5/Labels-page/bd-p/Category_Labels?categoryId=qlik-ideas&corenode=boards.... It is not possible for a user to customize the error messages and I don't know if this specific error can be captured when it happens in order to display a more specific message. This need to be evaluated by the developers team.
Best Regards,
Ruggero
That should be very nice. Is will save us a lot of questions from customers and time of our development team to investigate if there is a technical problem or are there simply no facts for the report with the combination of filters given.
Regards,
Marcel