Commit graph

73 commits

Author SHA1 Message Date
simon lehericey
cd4ad6878c remove insee_api_v3 feature 2021-04-06 18:23:14 +02:00
simon lehericey
f7ae974f29 Add throttling for api entreprise 2021-02-10 12:40:14 +01:00
Pierre de La Morinerie
150ddab660 zeitwerk: Api -> API 2021-02-09 13:07:30 +01:00
kara Diaby
f748ccfc9e Appelle l'API entreprise avec le token en Header 2020-12-10 17:49:49 +01:00
simon lehericey
b187244a29 extract and refactor api errors 2020-12-04 17:07:30 +01:00
simon lehericey
f56235c7ee retry exponentially on api entreprise timeout 2020-12-03 11:52:01 +01:00
simon lehericey
78a40b5176 Increase api_entreprise_timeout 2020-12-03 10:26:05 +01:00
simon lehericey
9eab310565 [#5675] for all api entreprise job, retry on 502, 503 2020-12-02 18:25:31 +01:00
simon lehericey
02e7de0003 more details when Typhoeus request fails 2020-12-02 18:25:31 +01:00
kara Diaby
bc0f77978f add an api token verification for api entreprise 2020-11-09 16:58:24 +01:00
simon lehericey
c563956a9f retry each day during 5 days to fetch attestation social 2020-10-28 15:53:58 +00:00
Christophe Robillard
f77cc06a91 prend en compte le nom de l'enseigne pour l'établissement 2020-08-20 14:23:02 +02:00
clemkeirua
7e085c657d specific deactivation of rubocop DS/ApplicationName rule 2020-07-23 16:20:16 +02:00
Christophe Robillard
f9b1b8217a more verbose exception when RequestFailed for apientreprise occurs 2020-06-11 17:24:45 +02:00
Christophe Robillard
8df9ae3a8d ask only effectifs for april 2020-06-10 17:41:13 +02:00
Christophe Robillard
1b509c15f8 raise exception with url 2020-05-20 15:53:08 +02:00
Christophe Robillard
d92a0ba8f3 raise BadFormatRequest error
L'intention est de distinguer ce type d'erreur avec les erreurs serveur
5xx.
Lorsque l'api est appelé par un Job, les erreurs serveur seront retry, car éphémères.
Alors que les erreurs de type BadFormatRequest ou ResourceNotFound n'ont
pas être retried.
2020-05-20 11:09:54 +02:00
Christophe Robillard
3b46594e60 precise http error code for api calls 2020-05-20 11:09:54 +02:00
Christophe Robillard
e3ee423197 call api_entreprise adapters with siret 2020-05-20 11:09:54 +02:00
Christophe Robillard
dbf04dd0d8 make api entreprise call only if token not expired 2020-05-06 10:57:45 +02:00
Christophe Robillard
85b2e9ef44 create bilans_bdf_adapter 2020-04-30 16:15:16 +02:00
Christophe Robillard
38c68b16e3 create attestation_fiscale_adapter 2020-04-30 11:39:54 +02:00
Christophe Robillard
158b4802ab store attestation sociale and display 2020-04-29 16:25:47 +02:00
Christophe Robillard
d74b14c205 fetch attestation sociale url 2020-04-29 14:25:55 +02:00
Christophe Robillard
b147956a92 create attestation_sociale_adapter 2020-04-29 14:01:48 +02:00
Christophe Robillard
e29af48420 call api_entreprise with specific token if exist 2020-04-28 15:17:11 +02:00
Christophe Robillard
453adf3c74 instructeurs: affiche l'effectif moyen annuel n-1 2020-04-23 09:53:27 +02:00
Christophe Robillard
1165f8483d rename effectif columns 2020-04-21 21:13:07 +02:00
Christophe Robillard
599d8e33e8 create ApiEntreprise::EffectifsAdapter 2020-04-21 14:22:11 +02:00
Christophe Robillard
91abcd7792 récupère les infos d'établissement avec infos non diffusables 2020-03-17 15:57:02 +00:00
Paul Chavard
c281347da1 Remove restclient 2020-03-17 11:12:14 +01:00
Paul Chavard
65e227c44b Migrate to flipper 2019-09-10 16:10:14 +02:00
Pierre de La Morinerie
55c9dfc001 api_entreprise: display better error message when SIRET is private
Previously we blamed the network.

Now we say that the entreprise infos cannot be retrieved. Which is not
ideal, but better.
2019-06-12 11:58:04 +02:00
Pierre de La Morinerie
ad4a89f0f6 api_entreprise: raise on network error 2019-05-02 11:24:22 +02:00
Pierre de La Morinerie
6c8280fba6 api_entreprise: add a feature flag for toggling API INSEE v3 2019-04-30 17:27:58 +02:00
Pierre de La Morinerie
b74fdd3cc8 Revert "Fix API Entreprise call"
This reverts commit 7deb228477.
2019-04-30 17:19:46 +02:00
simon lehericey
7deb228477 Fix API Entreprise call 2019-04-30 10:27:35 +02:00
Pierre de La Morinerie
e90b1cdcc0 api_entreprise: use API v3 again
This reverts commit 10e1408a88.
2019-04-04 17:14:58 +02:00
Pierre de La Morinerie
10e1408a88 api_entreprise: revert to API v2
Fix a production error
2019-04-03 12:19:28 +02:00
Mathieu Magnin
ff0356e698 Fix Sentry 165 : api crash when siret is unknown 2019-03-12 17:53:11 +01:00
gregoirenovel
3b0562949c Ask API Entreprise for insee v3 2018-12-10 10:49:56 +01:00
gregoirenovel
31250b4642 Make more ApiEntreprise::API methods private 2018-12-10 10:48:57 +01:00
simon lehericey
ee0a6b1913 Time.at => Time.zone.at 2018-10-26 10:10:20 +00:00
gregoirenovel
a8af27105d Remove ssl_verifypeer option in ApiEntreprise::API.call
SSL seems OK for https://entreprise.api.gouv.fr/
2018-10-16 10:23:30 +02:00
gregoirenovel
f66f0f9668 Remove two useless initialize methods 2018-10-16 09:33:16 +02:00
gregoirenovel
7fe3b43eab Improve a comment in RNAAdapter 2018-10-04 21:03:49 +02:00
gregoirenovel
1ffd4a230b Simplify RNAAdapter#process_params
Avoid catching an attribute only to remove it
a few lines later
2018-10-04 21:03:49 +02:00
gregoirenovel
b28607a3a6 Simplify an instruction in ExercicesAdapter#process_params 2018-10-04 21:03:49 +02:00
Paul Chavard
1302b68d91 Only reject api entreprise data if required fields are missing 2018-10-04 17:55:09 +02:00
gregoirenovel
9284afc649 Use a constant for the API Entreprise URL 2018-08-28 10:44:16 +02:00