Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Data Importer doesn't show helpful error when authenticating against Spectre with an App type API key #8381

Open
4 tasks done
PolygonError opened this issue Jan 13, 2024 · 2 comments
Labels
enhancement Requests for enhancements of existing stuff.

Comments

@PolygonError
Copy link

Support guidelines

I've found a bug and checked that ...

Description

When attempting to setup the Data Importer to authenticate against Spectre with my API key I was greated with 'Impossible flow exception.' 500 Error.
The logs show that this is caused by Spectre not supporting an endpoint with App API tokens, as shown in this log snippet

[2024-01-13 22:07:31] local.DEBUG: Now in AuthenticateController, calling middleware.
[2024-01-13 22:07:31] local.DEBUG: isReadyForSpectreStep("authenticate")
[2024-01-13 22:07:31] local.DEBUG: Now at App\Services\Spectre\AuthenticationValidator::validate
[2024-01-13 22:07:31] local.DEBUG: setParameters
[2024-01-13 22:07:32] local.ERROR: TransferException: Client error: `GET https://www.saltedge.com/api/v5/customers` resulted in a `400 Bad Request` response:
{"error":{"class":"AppsRestricted","message":"Not available for apps.","documentation_url":"https://docs.saltedge.com/ac (truncated...)

[2024-01-13 22:07:32] local.ERROR: Transfer exception leads to error.

This API key type is not mentioned in the docs when setting up a Salt Edge account.

Debug information

Debug information generated at 2024-01-13 22:12:56 Australia/Brisbane for Firefly III Data Importer version 1.4.0.

System information
ItemValue
Version1.4.0
Build#, base #67
SystemPHP 8.3.0, Linux, apache2handler
App information
ItemValue
TimezoneAustralia/Brisbane, Australia/Brisbane
Environmentlocal
Debug modefalse, cache 'file'
Log leveldebug, stack
Display errorsOff, ALL errors
BCscale12
Trusted proxies**
User information
ItemValue
User agentMozilla/5.0 (Windows NT 10.0; Win64; x64; rv:122.0) Gecko/20100101 Firefox/122.0

Expected behaviour

The importer should notify the user that a Service API key is required for the Spectre data importer.

Steps to reproduce

  1. Go to the Firefly III Universal Data Import Tool front page after authenticating against Firefly III
  2. Press 'Import from Spectre'
  3. Put in a Spectre App ID and secret that are setup as an App API key on saltedge.com

Additional info

No response

@JC5
Copy link
Member

JC5 commented Jan 13, 2024

You're the first one I know of who did this, but I'll pick it up and see if I can give an proper message about this exception 👍

@JC5 JC5 added the enhancement Requests for enhancements of existing stuff. label Jan 13, 2024
@JC5 JC5 added this to the firefly-iii-v6.1.7 milestone Jan 13, 2024
Copy link
Contributor

Hi there! This is an automatic reply. Share and enjoy

This issue has been marked as an enhancement. The requested enhancement to an existing feature will become a part of Firefly III or the data importer in due course.

If you come across this issue, please be aware there is NO need to reply with "+1" or "me too" or "I need this too" or whatever. Such comments are not helpful, and do not influence the roadmap. Your comment may be 💀 deleted. You can subscribe to this issue to get updates.

Thank you for your contributions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Requests for enhancements of existing stuff.
Projects
Status: Done
Development

No branches or pull requests

2 participants