Commit Graph

7 Commits

Author SHA1 Message Date
chris48s
a5f91a40e5 fix a load of spacing issues in frontend content (#9281) 2023-06-18 09:05:42 +01:00
chris48s
14892e3943 Implement a pattern for dealing with upstream APIs which are slow on the first hit; affects [endpoint] (#9233)
* allow serviceData to override cacheSeconds with a longer value

* prevent [endpoint] json cacheSeconds property exceeding service default

* allow ShieldsRuntimeError to specify a cacheSeconds property

By default error responses use the cacheLength of
the service class throwing the error.

This allows error to tell the handling layer the maxAge
that should be set on the error badge response.

* add customExceptions param

This

1. allows us to specify custom properties to pass to the exception
   constructor if we throw any of the standard got errors
   e.g: `ETIMEDOUT`, `ECONNRESET`, etc
2. uses a custom `cacheSeconds` property (if set on the exception)
   to set the response maxAge

* customExceptions --> systemErrors

* errorMessages --> httpErrors
2023-06-13 21:08:43 +01:00
Caleb Cartwright
c0642663b3 tests: increase timeout for tokei gitlab tests (#7275)
Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
2021-12-01 20:51:25 +00:00
Pierre-Yves B
23c0406bed Migrate from CommonJS to ESM (#6651) 2021-07-09 12:53:55 +01:00
homersimpsons
3597b7e80f Refactor forgotten static get in services (#5794)
Co-authored-by: Guillaume <g.alabre@thecodingmachine.com>
2020-11-05 20:35:10 +00:00
chris48s
504015c0ba migrate hapi/joi to joi (#5624)
* update joi + joi-extension-semver

* @hapi/joi --> joi

Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
2020-09-30 17:51:02 +00:00
Jonathan
c8eb99fc4c [Tokei] Implement a lines of code (LOC) badge (#5547)
* Implement LOC badge

* Apply suggestions from code review

Co-authored-by: Caleb Cartwright <calebcartwright@users.noreply.github.com>

* Fix tokei tests after API change

* Format the code

* Rename tokei service file

* Add comment about Tokei API behavior

* Document tokei badge behavior

Co-authored-by: Caleb Cartwright <calebcartwright@users.noreply.github.com>
2020-09-17 22:34:15 -05:00