ampproject / ampproject/amp.dev
Host runtime log messages
- Dominant language
- HTML
- Stars
- 600
- Forks
- 675
- PR merge metrics
- No merged PRs in 30d
Description
AMP runtime messages of the form:
```
message(`${foo} failed to ${bar}.`)
```
will be transpiled into:
```
linkedMessage('0', foo, bar)
```
'0' is indirected to a table linked elsewhere. The most appropriate place to put this is probably amp.dev.
amp.dev needs infra to serve these error messages and interpolate the message:
```
https://log.amp.dev/?e=0&s[]=amp-list&s[]=initialize&v=XXXX
```
Would then render HTML:
```
amp-list failed to initialize.
```
`v` is an identifier for runtime version since the message sets divert. The table will be static and JSON-formatted. The keys are error ids as base36 strings and the values are the messages in printf interpolation format.
```
{
'0': '%s failed to %s.',
// ...
}
```
Things we need to do:
- [ ] Download and cache versioned error message JSON from cdn.ampproject.org
- [ ] Implement log.amp.dev endpoint serving HTML error messages
- [ ] Design the error message page
//cc @alanorozco
Contributor guide
Assessment
This issue has not been assessed yet.